#include using namespace std; int MOD=1000003; long long n,ans; long long gcd(long long p,long long q){ long long r; while(q){ r=p%q; p=q; q=r; } return p; } int main(){ cin>>n; n/=4; for(long long i=1;i*in) break; if(gcd(gcd(a,b),c)==1) ans=(ans+1)%MOD; } cout<