aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

from sys import stdin,stdout
import re
s=stdin.readline().strip()
arr=[]
marker=0;

ns = re.sub('[^ab]', '', s)
def solve(s):
	ans=1
	tctr=0
	for i in s:
		if i=='a':
			tctr+=1
		else:
			if tctr!=0:
				ans=(ans*(tctr+1))%(10**9 + 7)
			tctr=0
	if tctr!=0:
		ans=(ans*(tctr+1))%(10**9 + 7)

	return ans-1


finalans=solve(ns)
stdout.write(str(finalans))