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;
const int MOD = 1e9 + 7;
int main() {
  string s;
  cin >> s;
  string a = "";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'a' || s[i] == 'b') a += s[i];
  }
  int ans = 1, cnt = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == 'b') {
      ans = (ans * 1ll * (cnt + 1)) % MOD;
      cnt = 0;
    } else {
      cnt++;
    }
  }
  ans = (ans * 1ll * (cnt + 1)) % MOD;
  printf("%d\n", ans - 1);
  return 0;
}
