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 long long maxn = 100005, md = 1000000007;
char s[maxn];
long long dat[maxn];
long long len, cnt, ans;
int main() {
  scanf("%s", s);
  len = strlen(s);
  for (long long i = 0; i < len; i++) {
    if (s[i] == 'a')
      dat[cnt]++;
    else if (s[i] == 'b')
      dat[++cnt] = 0;
    else {
      long long ad = 1;
      for (long long i = 0; i <= cnt; i++) ad *= dat[i] + 1;
      ans = (ans + ad - 1) % md;
      cnt = 0;
      dat[0] = 0;
    }
  }
  long long ad = 1;
  for (long long i = 0; i <= cnt; i++) ad *= dat[i] + 1;
  ans = (ans + ad - 1) % md;
  printf("%I64d", ans);
  return 0;
}
