//(2^n-1)%mod //費馬小定理:a^n ≡ a^(n%(m-1)) * a^(m-1)≡ a^(n%(m-1)) (mod m) # include# include # include # define mod 1000000007 using namespace std; __int64 pow(__int64 n) { __int64 p=1,q=2; while(n) { if(n%2) { p=p*q%mod; } n/=2; q=q*q%mod; } return p; } char str[1000100]; int main() { __int64 i,n,len; while(~scanf("%s",str)) { len=strlen(str); n=0; for(i=0;i