aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

s = str(input())
mod = 10**9+7
cnt = 0
X = []
for c in s:
    if c == 'a':
        cnt += 1
    elif c == 'b':
        X.append(cnt)
        cnt = 0
else:
    X.append(cnt)
#print(X)
ans = 1
for x in X:
    ans *= (x+1)
    ans %= mod
ans -=1
print(ans%mod)
