aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
int main() {
  string st1, st2;
  cin >> st1;
  int cnt = 0;
  for (int i = 0; i < st1.size(); i++)
    if (st1[i] == 'a' || st1[i] == 'b') st2 += st1[i];
  for (int i = 0; i < st2.size(); i++) {
    if (st2[i] == 'a')
      cnt++;
    else {
      if (cnt != 0) vec.push_back(cnt);
      cnt = 0;
    }
  }
  vec.push_back(cnt);
  int sum = 1;
  for (int i = 0; i < vec.size(); i++) {
    vec[i] = (vec[i] + 1) % 1000000007;
    sum = (sum * vec[i]) % 100000007;
  }
  cout << sum - 1 << endl;
}
