aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

s = input()
ans = 1
preans = 0
for i in range(len(s)):
    if s[i] not in ['a', 'b']:
        continue
    if s[i] == 'a':
        preans += 1
    else:
        if preans > 0:
            ans = ans * (preans + 1) % (10 ** 9 + 7)
        preans = 0
if preans > 0:
    ans = ans * (preans + 1) % (10 ** 9 + 7)
print((ans - 1) % (10 ** 9 + 7))
