aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

n = list(input())
ans = 1
a = []
for i in range(len(n)):
    if n[i] == "a" or n[i] == "b":
        a.append(n[i])
count = 0
for j in range(len(a)):
    if a[j] == "a":
        count += 1
    elif a[j] == "b":
        ans *= (count + 1)
        ans = ans % (10 ** 9 + 7)
        count = 0
ans *= (count + 1)
print((ans - 1) % (10 ** 9 + 7))