#include typedef long long TYPE; const TYPE mod=1E9+7; TYPE input() { TYPE x;std::cin>>x; return x; } const TYPE bits=1000000; const int maxn=32; struct big { TYPE x[maxn]; big(TYPE y=0) { int len=0; memset(x,0,sizeof x); while(y>0) { x[len]=y%bits; y/=bits; len++; } } TYPE&operator[](const int&i) { return x[i]; } const TYPE&operator [](const int&i)const { return x[i]; } /* void show() { for(int i=maxn-1;i>=0;--i) { printf("%08lld",x[i]); } }*/ }; big operator + (const big&a,const big&b) { big c; for(int i=0;i=0;--i) { if(a[i]!=b[i])return a[i]=0;--i) { ans=(ans*bits%mod+g[i])%mod; } std::cout<0) doing(); return 0; }