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;
int main() {
  string s;
  cin >> s;
  vector<long long int> v;
  string a;
  for (long long int i = 0; i < s.length(); i++) {
    if (s[i] == 'a' || s[i] == 'b') a += s[i];
  }
  for (long long int i = 0; i < a.length(); i++) {
    long long int count = 0;
    if (a[i] == 'a') {
      while (i < a.length() && a[i] == 'a') {
        count++;
        i++;
      }
      i--;
    }
    v.push_back(count);
  }
  long long int ans = 1;
  long long int mod = pow(10, 9) + 7;
  for (long long int i = 0; i < v.size(); i++) {
    ans = (ans * (v[i] + 1)) % mod;
  }
  cout << ans - 1;
  return 0;
}
