aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

# -*- coding: utf-8 -*-

import re

s = input()
mod = 10 ** 9 + 7

s = re.sub(r'[^a-b]', '', s)
s = re.sub(r'b+', 'b', s)
s = re.sub(r'^b', '', s)
s = re.sub(r'b$', '', s)

s = s.split('b')
if s[0] != '':
    ans = 1
    for i in range(len(s)):
        ans = (ans * (len(s[i]) + 1)) % mod
    print(ans - 1)
else:
    print(0)
