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 div411Dn
{
	BufferedReader in;
	PrintWriter ob;
	StringTokenizer st;
	public static void main(String[] args) throws IOException {
		new div411Dn().run();
	}
	void run() throws IOException {
		//in=new BufferedReader(new FileReader("input.txt"));
		in=new BufferedReader(new InputStreamReader(System.in));
		ob=new PrintWriter(System.out);
		solve();
		ob.flush();
	}
	void solve() throws IOException {
			char s[] = ns().toCharArray();
			int cnt = 0;
			long ans = 0;
			long mod = (long)(1e9)+7;
			for (int i=0; i<s.length ; i++ ) {
				if(s[i]=='a') 
					++cnt;
				else if(s[i]=='b') {
					if(cnt>0) {
						ans += PowerMod(2,cnt,mod);
						ans = (ans-1+mod)%mod;
					}
				}
			}
			ob.println((ans+mod)%mod);
	}
	public long  PowerMod(long a, long b, long m) {
   	 long  tempo;
  	if (b ==0 ){
   		tempo =  1;  //EXIT condition
   	}
  	else  if (b == 1) tempo = a;
        	else { long temp = PowerMod(a,b/2,m);
            	if (b%2 == 0)
               		tempo = (temp*temp)%m;
            	else
     		    	tempo = ((temp*temp)%m)*a%m;
		   }
    	return tempo;
 	}

	String ns() throws IOException {
		return nextToken();
	}
	long nl() throws IOException {
		return Long.parseLong(nextToken());
	}
	int ni() throws IOException {
		return Integer.parseInt(nextToken());
	}
	double nd() throws IOException {
		return Double.parseDouble(nextToken());
	} 
	String nextToken() throws IOException {
		while(st==null || !st.hasMoreTokens())
			st=new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int[] nia(int start,int b) throws IOException {
		int a[]=new int[b];
		for(int i=start;i<b;i++)
			a[i]=ni();
		return a;
	}
	long[] nla(int start,int n) throws IOException {
		long a[]=new long[n];
		for (int i=start; i<n ;i++ ) {
			a[i]=nl();
		}
		return a;
	}
}