aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

s = input()
char = "qwertyuiopsdfghjklzxcvnmñ"
for i in range(len(char)):
    s = s.replace(char[i],"")

count = 0
total = []
sol =1
for i in range(len(s)):
    if s[i] == "a" :
        count+=1   
    if s[i] == "b" or i == len(s)-1:
        total += [count]
        count =0 
for i in total:
    sol = sol*(i+1)



    
   
print((sol-1)%1000000007) 