#include <bits/stdc++.h>
using namespace std;
int main() {
  int f, r, i, j, k, l, x, y;
  long long n2[201];
  string X;
  n2[0] = 1;
  for (int i = 0; i < 200; i++) n2[i + 1] = (n2[i] * 2) % 1000000007;
  cin >> X;
  long long ret = 0;
  for (int i = 0; i < X.size(); i++) {
    if (X[i] == '1')
      ret = (ret + n2[i] * n2[2 * (X.size() - i - 1)]) % 1000000007;
  }
  cout << ret << endl;
}
