We have a string of letters 'a' and 'b'. We want to perform some operations on it. On each step we choose one of substrings "ab" in the string and replace it with the string "bba". If we have no "ab" as a substring, our job is done. Print the minimum number of steps we should perform to make our job done modulo 109 + 7.

The string "ab" appears as a substring if there is a letter 'b' right after the letter 'a' somewhere in the string.

Input

The first line contains the initial string consisting of letters 'a' and 'b' only with length from 1 to 106.

Output

Print the minimum number of steps modulo 109 + 7.

Examples

Input

ab


Output

1


Input

aab


Output

3

Note

The first example: "ab"  →  "bba".

The second example: "aab"  →  "abba"  →  "bbaba"  →  "bbbbaa".
import java.io.*;
import java.util.*;

public class Main {
    private static long mod = 1000000007L;
    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
        String letters = Reader.next();
        int count = 0;
        long ans = 0;
        for (int i = 0; i < letters.length(); i++) {
            if (letters.charAt(i) == 'a') count++;
            else if (letters.charAt(i) == 'b'){
                if (count > 0) {
                    ans = (ans + 2*count + 2*seqProblem(count - 2) + mod - 1) % mod;
                }
            }
        }
        System.out.println(ans);
    }

    private static long seqProblem(int n){
        return (base2FastExponentiation(2, n + 1) + mod - n - 2) % mod;
    }

    private static long base2FastExponentiation(long x, int n){
        long ans = 1;

        while (n > 0){
            if (n % 2 == 1) ans = (ans*x) % mod;
            x = (x*x) % mod;
            n /= 2;
        }

        return ans;
    }
}



/**
 * Reader class based on the article at "https://www.cpe.ku.ac.th/~jim/java-io.html"
 * */
class Reader{
    private static BufferedReader reader;
    private static StringTokenizer tokenizer;
    static void init(InputStream inputStream){
        reader = new BufferedReader(new InputStreamReader(inputStream));
        tokenizer = new StringTokenizer("");
    }
    static String next() throws IOException {
        String read;
        while (!tokenizer.hasMoreTokens()){
            read = reader.readLine();
            if (read == null || read.equals(""))
                return "-1";
            tokenizer = new StringTokenizer(read);
        }

        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }

//    static long nextLong() throws IOException{
//        return Long.parseLong(next());
//    }

    //Get a whole line.
//    static String line() throws IOException{
//        return reader.readLine();
//    }
//
//    static double nextDouble() throws IOException{return Double.parseDouble(next());}
}



