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;
long long int productOfSubsetSums(long long int arr[], long long int n) {
  long long int ans = 1;
  for (long long int i = 0; i < n; ++i) ans = ans * (arr[i] + 1);
  return (ans - 1) % 1000000007;
}
int main() {
  char str[100000];
  char par[100000];
  long long int j = 0, n, m, arr[100000];
  cin >> str;
  n = strlen(str);
  for (long long int i = 0; i < n; i++) {
    if (str[i] == 'a' || str[i] == 'b') {
      par[j] = str[i];
      j++;
    }
  }
  m = strlen(par);
  long long int count = 0, z = 0;
  for (long long int i = 0; i < m; i++) {
    if (par[i] == 'b') {
      if (count != 0) {
        arr[z] = count;
        z++;
        count = 0;
      }
    } else if (i == m - 1 && par[i] == 'a') {
      arr[z] = count + 1;
      z++;
    } else {
      count++;
    }
  }
  cout << productOfSubsetSums(arr, z) % (1000000007) << endl;
  return 0;
}
