#include <bits/stdc++.h>   using namespace std;   const int N = 1e9 + 7;   int main() {     string s;     cin >> s;     int ans = 0;     int t = 0;     for (int i = s.length() - 1; i >= 0; i--) {       if (s[i] ==  b )         t = (t + 1) % N;       else {         ans = (ans + t) % N;         t = (t * 2) % N;       }     }     cout << ans << endl;     return 0;   }   