aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

MOD=10**9+7 
l=input()
l=[i for i in l if i=='a' or i=='b']
grp=[]
n=len(l)
c=0
for i in range(n):
    if l[i]=='a':
        c+=1 
    else:
        grp.append(c)
        c=0 
if c>0:
    grp.append(c)
ans=1 
for i in range(len(grp)):
    ans=(ans*(grp[i]+1))%MOD 
ans=(ans-1+MOD)%MOD 
print(ans if 'a' in l else 0)