aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

mod = 10**9+7
s = list(input())
for i in range(len(s)):
    if s[i] is not  'a' and  s[i] is not 'b':
        s[i] = ''
s = "".join(s)
l = s.split('b')

ans , k = 1,1
for i in l:
    if i != '':
        k = len(i) + 1
        ans *= k
        ans %= mod

print(ans-1)

