aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

mod = 1000000007;

def modulo(a):
    resp = a % mod;
    if resp < 0:
        return (resp + mod)
    return resp

s = input()
resp = 1
c = 1
for l in s:
    if l == 'a':
        c += 1
    elif l == 'b':
        resp = modulo(resp * c)
        c = 1

resp = modulo((resp * c) - 1);

print(resp)
	 				 	     		  	   		 		  		