package no152; import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt() / 4; HashSet> hs = new HashSet<>(); for(long a=1;a<=l/2;a++) { for(long b=a;a+b l) { continue; } long gcd = gcd(a,b); hs.add(new Pair<>((int) (a/gcd),(int) (b/gcd))); } } // System.out.println(hs); System.out.println(hs.size() % 1000003); } public static long gcd(long a,long b) { while(b!=0) { long r = a%b; a = b; b = r; } return a; } } class Pair,B extends Comparable> implements Comparable>{ A a; B b; public Pair(A a,B b) { this.a = a; this.b = b; } public int compareTo(Pair o) { int comp = a.compareTo(o.a); if (comp != 0) { return comp; } return b.compareTo(o.b); } public boolean equals(Object o) { if (o instanceof Pair) { @SuppressWarnings("rawtypes") Pair p = (Pair) o; return a.equals(p.a) && b.equals(p.b); } return super.equals(o); } public int hashCode() { return a.hashCode() + b.hashCode(); } public String toString() { return "[" + a + "," + b + "]"; } }