aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

string = input()

clean = list()

cnt = 1

for c in string:
    if c == 'a' or c == 'b':
        if len(clean) == 0:
            clean.append(c)
        elif c == 'b':
            if clean[-1] != 'b':
                clean.append(c)
        else:
            clean.append(c)

splt = ''.join(clean).split('b')

for i in range(len(splt)):
    cnt *= len(splt[i]) + 1

print((cnt - 1) % 1000000007)
