aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762


if __name__ == '__main__':
    n2 = input()
    n =''
    for i in n2:
        if i =='a' or i =='b':
            n+=i
    while n.startswith('b'):
        n= n[1:]
    while n.endswith('b'):
        n = n[:-1]
    s = 1
    numbers_of_a = 0
    while n :
        k = n.find('b')
        if k!=-1:
            s*=(k+1)
            n = n[k+1:]
        else:
            s*=(len(n)+1)
            break
    print((s-1)%1000000007)

