aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

'''input
abbaa
'''
from sys import stdin
import math


def clean_it(string):
    mystack = []
    for i in range(len(string)):
        if string[i] == 'a' or string[i] == 'b':
            if len(mystack) == 0:
                if string[i] == 'a':
                    mystack.append(string[i])
            elif mystack[-1] == 'a':
                mystack.append(string[i])
            elif mystack[-1] == 'b':
                if string[i] == 'a':
                    mystack.append(string[i])
        
    return mystack
            


# main starts
mod = 10 ** 9 + 7
string = list(stdin.readline().strip())
string = ''.join(clean_it(string))

string = list(string.split('b'))

product = 1
for i in string:
	product  *= len(i) + 1
	product %= mod
print(product -1)
