aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

import re
s = input ()
ans = 1
s = re.sub(r'[^a-b]', '', s)
#print (s)
s = re.sub(r'b+', 'b', s)
#print (s)
s = re.sub(r'^b', '', s)
#print (s)
s = re.sub(r'b$', '', s)
#print (s)

s = s.split('b')
#print (s)
for i in range(len(s)):
    ans = (ans*len(s[i])  + ans)%(10**9+7)
    # ans = ans % 10**9+7
print(ans -1)