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;
typedef long long ll;
const ll mod = 1e9 + 7;
const ll N = 1e5 + 5;
ll mat[N];
vector<int> v;
void solve() {
  string s, t;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'a' || s[i] == 'b') t.push_back(s[i]);
    ;
  }
  s = t;
  ll c = 0, ans = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'a')
      c++;
    else if (s[i] == 'b') {
      if (c) ans = (ans * (c + 1)) % mod;
      c = 0;
    }
  }
  if (c) ans = (ans * (c + 1)) % mod;
  cout << ans - 1;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
