/*************************************** codeforces = topcoder = sahedsohel IIT,Jahangirnagar University(42) ****************************************/ #include using namespace std; #define ll long long int #define ull unsigned long long int #define inf (INT_MAX/10) #define linf (LLONG_MAX/10LL) #define sc(a) scanf("%d",&a) #define sc2(a,b) scanf("%d%d",&a,&b) #define sc3(a,b,c) scanf("%d%d%d",&a,&b,&c) #define sc4(a,b,c,d) scanf("%d%d%d%d",&a,&b,&c,&d) #define f(i,n) for(i=0;i #define pii pair< int , int > #define pid pair< int , double > #define pcs(a) printf("Case %d: ", a) #define nl puts("") #define endl '\n' #define dbg(x) cout<<#x<<" : "< inline T bigmod(T p,T e,T M){ll ret = 1;for(; e > 0; e >>= 1){if(e & 1) ret = (ret * p) % M;p = (p * p) % M;}return (T)ret;} template inline T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);} template inline T modinverse(T a,T M){return bigmod(a,M-2,M);} // M is prime} template inline T bpow(T p,T e){ll ret = 1;for(; e > 0; e >>= 1){if(e & 1) ret = (ret * p);p = (p * p);}return (T)ret;} int toInt(string s){int sm;stringstream ss(s);ss>>sm;return sm;} int toLlint(string s){long long int sm;stringstream ss(s);ss>>sm;return sm;} ///int mnth[]={-1,31,28,31,30,31,30,31,31,30,31,30,31}; //Not Leap Year ///int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};//Knight Direction ///int dx[]={-1,+1,0,1,0,-1}; // Hexagonal Direction ** ///int dy[]={-1,+1,1,0,-1,0}; // *#* /// ** ///const double eps=1e-9; ///int dx[]={0,1,0,-1};int dy[]={1,0,-1,0}; //4 Direction /*****************************************************************/ /// //////////////////// GET SET GO ////////////////////// /// /*****************************************************************/ #define intx(i,j,k,l) ((a[i]*b[j]-b[i]*a[j])*(a[k]-a[l])-(a[i]-a[j])*(a[k]*b[l]-b[k]*a[l]))/((a[i]-a[j])*(b[k]-b[l])-(b[i]-b[j])*(a[k]-a[l])) #define inty(i,j,k,l) ((a[i]*b[j]-b[i]*a[j])*(b[k]-b[l])-(b[i]-b[j])*(a[k]*b[l]-b[k]*a[l]))/((a[i]-a[j])*(b[k]-b[l])-(b[i]-b[j])*(a[k]-a[l])) #define dst(u,v,x,y) sqrt((x*1.0-u*1.0)*(x*1.0-u*1.0)+(y*1.0-v*1.0)*(y*1.0-v*1.0)) #define area(p1,p2,p3) (p1.xx*p2.yy+p2.xx*p3.yy+p3.xx*p1.yy-p1.yy*p2.xx-p2.yy*p3.xx-p3.yy*p1.xx) int ts,kk=1; #define M 100005 #define MD 1000000007LL #define MX 10001LL map< pii , ll > p; map< pii , ll > ::iterator it; ll clc(ll n,ll m) { // cerr<m)swap(n,m); if(n<=1)return max(m-1,0LL); it=p.find(pii(n,m)); if(it!=p.end())return it->yy; ll pr=clc(m/2,n)+clc(m-m/2,n)+1; // ll pr=clc(n/2,m)+clc(n-n/2,m); p[ pii(n,m) ]=pr; return pr; // if(p) // if(n<1004&&m<1004){ // if(p[n][m]!=-1)return p[n][m]; // return p[n][m]=; // } // else // return clc(m/2,n)+clc(m-m/2,n); } ll n,m; int main() { int t,i,j,k; cin>>n>>m; cout<