aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

mod = 1000000007
txt = raw_input()
tam = len(txt)
res = 1
i=0
while (i < tam):
  j = 1
  k = i
  while(k<tam):
    if txt[k]=='a':
      k+=1
      j+=1
    elif txt[k]=='b':
      break
    else:
      k+=1
  i = k
  res = res*(j)%mod
  i+=1

print res-1

 			 			    	   	  	     			 		