aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class FairNutString {

    static BufferedReader _in = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer _stk;
    static String next() {
        try {
            while (_stk == null || !_stk.hasMoreTokens())
                _stk = new StringTokenizer(_in.readLine());

            return _stk.nextToken();
        } catch(Exception ex) {
            throw new RuntimeException("Failed reading input", ex);
        }
    }
    static int nextInt() { return Integer.parseInt(next()); }
    static long nextLong() { return Long.parseLong(next()); }
    static double nextDouble() { return Double.parseDouble(next()); }

    private static final long MOD = (long) 1e9+7;
    public static void main(String [] args) throws IOException {
       String S = next();
       List<Integer> groups = new ArrayList<>();
       String[] parts = S.split("b");
       for(String part : parts) {
           int as = counta(part);
           if(as>0)
               groups.add(as);
       }
       
       long mul = 1;
       for(int g : groups) {
           mul = (mul * (g+1)) % MOD;
       }

       long res = (mul + MOD-1)%MOD;
        System.out.println(res);
    }

    private static int counta(String part) {
        int cnt = 0;
        for(int i = 0; i<part.length(); i++) {
            if(part.charAt(i)=='a')
                cnt++;
        }
        return cnt;
    }


}