#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define fi first
#define se second
long long mo = 1000000007;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef pair<ll,Pll> PlP;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}
ld PI=3.14159265358979323846;

const int mod = 1000000007;
class mint {
    long long x;
public:
    mint(long long x=0) : x((x%mod+mod)%mod) {}
    mint operator-() const { 
      return mint(-x);
    }
    mint& operator+=(const mint& a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint& a) {
        if ((x += mod-a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const  mint& a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint& a) const {
        mint res(*this);
        return res+=a;
    }
    mint operator-(const mint& a) const {
        mint res(*this);
        return res-=a;
    }
    mint operator*(const mint& a) const {
        mint res(*this);
        return res*=a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
    }
    // for prime mod
    mint inv() const {
        return pow(mod-2);
    }
    mint& operator/=(const mint& a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint& a) const {
        mint res(*this);
        return res/=a;
    }
 
    friend ostream& operator<<(ostream& os, const mint& m){
        os << m.x;
        return os;
    }
};
 
struct combination {
  vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
} comb(200010);

int main(){
    string S;
    cin >> S;
    ll N = S.size();
    vector<ll> v(N),u;
    //u.push_back(0);
    ll none = 0;
    rep(i,N){
        if(S[i] == '1'){
            v[i] = 1;
            //u.push_back(i+1);
            none++;
        }else{
            v[i] = 0;
        }
    }
    vector<vector<mint>> dp(N+1,vector<mint>(2));
    dp[0][0] = 1;
    rep(i,N){
        // a+b = 0;
        if(v[i]){
            dp[i+1][1] = dp[i][1] + dp[i][0];
        }else{
            dp[i+1][0] = dp[i][0];
            dp[i+1][1] = dp[i][1];
        }
        // a+b = 1; 
        if(v[i]){
            dp[i+1][1] += dp[i][1]*2;
            dp[i+1][0] += dp[i][0]*2;
        }else{
            dp[i+1][1] += dp[i][1]*2;
        }
    }
    //cout << dp[N][0] <<" " << dp[N][1] << endl;
    cout << (dp[N][0] + dp[N][1])<< endl;
    /*
    mint ans = 0;
    rep(k, none){
        mint tmp = 0;
        REP(i,k,N-u[k]+1+k){//i:=1 no kazu
            mint tmp2 = 0;
            //cout << "comb(" << N-u[k] << "," << i-k << ")" << endl;
            //tmp2 *= comb(N-u[k],i);
            rep(j,i+1){
                //cout << "--comb(" << i << "," << j << ")" << endl;
                tmp2 += comb(N-u[k],i-k)*comb(i,j);
            }
            tmp += tmp2;
        }
        //cout << "tmp:" << tmp << endl;
        ans += tmp;
    }
    rep(i,none+1){
        ans += comb(none,i);
        //mint tmp = 0;
        //rep(j,i+1){
            //tmp += comb(none,i)*comb(i,j);
        //}
       // ans += tmp;
    }
    cout << ans << endl;
    //vector<vector<ll>> dp(N+1, vector<ll>(2));
    /*rep(i,N){
        dp[i+1][0] = dp[i][0];
        dp[i+1][1] = dp[i][1] + dp[i][0];
    }*/
    /*rep(i,none+1){
        ans *= comb(none,i);
    }
    cout << ans << endl;*/
}

Measured memory_bytes: 12732