aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

mod = 10**9 + 7
maxn = 10**5 + 5

res = 1
count = 0

s = input()

for i in range(len(s)):
  if(s[i] == "a"):
    count += 1
  else:
    res *= (count + 1)
    res %= mod
    count = 0

res *= (count + 1)
res -= 1
res %= mod

print(res)
      	 			   	   					   	 		