aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

from itertools import groupby
from operator import mul
from functools import reduce

s = input().strip()
s = "".join(c for c in s if c in {"a", "b"})
runs = []
for key, grp in groupby(s):
    if key == "a":
        runs.append(len(tuple(grp)))

result = (reduce(mul, [l+1 for l in runs], 1) - 1) % (10^9 + 7)
print(result)