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.util.*;
import java.io.*;

public class Main {
    
    public static long MOD = 1_000_000_007;
	 public static void solve() {

        Kattio in = new Kattio(System.in);
       	
       	char[] line = in.nextLine().toCharArray();
       	int i = line.length -1;
       	
       	long ans = 0, cnt = 0;
       	while(i >= 0) {
       	    if(line[i] == 'a') {
       	        ans = ((ans % MOD) + (cnt % MOD)) % MOD;
       	        cnt = (cnt * 2)%MOD;
       	    } else {
       	        cnt = (cnt + 1) % MOD;
       	    }
       	    
       	    i--;
       	}
       	
       	in.println(ans);
        

        in.flush();
        in.close();
    }


    public static void main(String args[] ) throws Exception {


        Thread t = new Thread(null, null, "~", Runtime.getRuntime().maxMemory()){
            @Override
            public void run() {
                solve();
            }
        };

        t.start();
        t.join();

    }

	public static int[] shuffle(int[] a, Random gen){ for(int i = 0, n = a.length;i < n;i++){ int ind = gen.nextInt(n-i)+i; int d = a[i]; a[i] = a[ind]; a[ind] = d; } return a; }




	private static class Kattio extends PrintWriter {
 
        private BufferedReader r;
        private String line;
        private StringTokenizer st;
        private String token;
        
        public Kattio(InputStream i) {
            super(new BufferedOutputStream(System.out));
            r = new BufferedReader(new InputStreamReader(i));
        }
        public Kattio(InputStream i, OutputStream o) {
            super(new BufferedOutputStream(o));
            r = new BufferedReader(new InputStreamReader(i));
        }
 
        public boolean hasNext() {
            return peekToken() != null;
        }
 
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
 
        public double nextDouble() { 
            return Double.parseDouble(nextToken());
        }
 
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
 
        public String next() {
            return nextToken();
        }
        
        public String nextLine() {
            token = null;
            st = null;
            try {
                return r.readLine();
            } catch (IOException e) {
                return null;
            }
        }
 
        private String peekToken() {
            if (token == null) 
                try {
                    while (st == null || !st.hasMoreTokens()) {
                        line = r.readLine();
                        if (line == null) return null;
                        st = new StringTokenizer(line);
                    }
                    token = st.nextToken();
                } catch (IOException e) { }
            return token;
        }
 
        private String nextToken() {
            String ans = peekToken();
            token = null;
            return ans;
        }
    }
}