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, s1;
  cin >> s;
  long long sum = 1, cnt = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == 'a' || s[i] == 'b') s1.push_back(s[i]);
  }
  s1 += 'b';
  for (int i = 0; i <= s1.length(); ++i) {
    if (s1[i] == 'a') {
      cnt++;
    } else {
      cnt++;
      sum *= cnt;
      cnt = 0;
    }
  }
  cout << (sum - 1) % 1000000007 << endl;
  return 0;
}
