aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

a = raw_input()
res = 1
cnt = 1


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

for i in a:
  if i == 'a':
    cnt += 1
  elif i == 'b':
    res = MOD(res * cnt)
    cnt = 1
res = MOD(res * cnt)

saida = MOD(res-1)

print saida
	  			   	  		 					      		  	