aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

MOD = 1000000007

def MD(x): return ((x % MOD) + MOD) % MOD

s = input()
res = 1
cnt = 1
for c in s:
    if(c == 'a'):
        cnt += 1
    elif(c == 'b'):
        res = MD(res*cnt)
        cnt = 1
res = MD(res*cnt)
print(MD(res-1))
     	 		 			 		  	 	 	 	 	  		