aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

string=list(input())
arr=[]
current=0
for let in string:
    if let=='a':
        current+=1
    if let=='b':
        arr+=[current]
        current=0
arr+=[current]
arr=[num+1 for num in arr]
def prod(arr,mod):
    ans=1
    for num in arr:
        ans=(ans*num)%mod
    return ans
print(prod(arr,10**9+7)-1)
