#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #define mod 1000003 #define INF 1000000000 #define LLINF 2000000000000000000LL #define LOG2 27 #define SIZE 100 int main(){ int x,N; ll N_2[LOG2],ans=0; int a[SIZE]; scanf("%d%d",&x,&N); for(int i=0;i0;j++){ if(a[i]%2){ b=(b*N_2[j])%mod; } a[i]/=2; } ans=(ans+b)%mod; } printf("%d\n",(int)ans); return 0; }