aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

palavra = input()

aux = 1
seq = []
palavra += 'b'
for i in range(len(palavra)):
  if(palavra[i] == 'a'):
    aux += 1
  if((palavra[i] == 'b') and (aux > 0)):
    seq.append(aux)
    aux = 1
 
num_de_seq = 1
for i in seq:
  num_de_seq = num_de_seq * i
  num_de_seq = num_de_seq % 1000000007

print((num_de_seq - 1) % 1000000007)
  				 	 		    	    					  	 		