The Fair Nut found a string s. The string consists of lowercase Latin letters. The Nut is a curious guy, so he wants to find the number of strictly increasing sequences p_1, p_2, …, p_k, such that: 

  1. For each i (1 ≤ i ≤ k), s_{p_i} = 'a'. 
  2. For each i (1 ≤ i < k), there is such j that p_i < j < p_{i + 1} and s_j = 'b'. 



The Nut is upset because he doesn't know how to find the number. Help him.

This number should be calculated modulo 10^9 + 7.

Input

The first line contains the string s (1 ≤ |s| ≤ 10^5) consisting of lowercase Latin letters.

Output

In a single line print the answer to the problem — the number of such sequences p_1, p_2, …, p_k modulo 10^9 + 7.

Examples

Input

abbaa


Output

5

Input

baaaa


Output

4

Input

agaa


Output

3

Note

In the first example, there are 5 possible sequences. [1], [4], [5], [1, 4], [1, 5].

In the second example, there are 4 possible sequences. [2], [3], [4], [5].

In the third example, there are 3 possible sequences. [1], [3], [4].
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class q6 {

	 public static int gcd(int a,int b) {
		 if(b==0) return a;
		 else return gcd(b,a%b);
	 }
	 
	 static long power(long x, long y, long p) 
	    { 
	        // Initialize result 
	        long res = 1;      
	         
	        // Update x if it is more   
	        // than or equal to p 
	        x = x % p;  
	      
	        while (y > 0) 
	        { 
	            // If y is odd, multiply x 
	            // with result 
	            if((y & 1)==1) 
	                res = (res * x) % p; 
	      
	            // y must be even now 
	            // y = y / 2 
	            y = y >> 1;  
	            x = (x * x) % p;  
	        } 
	        return res; 
	    } 
	 
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		Reader.init(System.in);
		String s=Reader.next();
		int n=s.length();
		long ans=0;
		long mod=1000000007;
		int[] arr=new int[n];
		int index=-1;
		boolean bf=false;
		for(int i=0;i<n;i++) {
			if(s.charAt(i)=='b') {
				bf=true;
			}
			else if(s.charAt(i)=='a') {
				if(bf) {
					arr[i]=index;
				}
				else {
					if(index!=-1) {
						if(arr[index]==-1) {
							arr[i]=-1;
						}
						else arr[i]=arr[index];
					}
					else {
						arr[i]=-1;
					}
				}
				index=i;
				bf=false;
			}
		}
		long[][] possible=new long[n][2];
		int id2=-1;
		for(int i=0;i<n;i++) {
			if(s.charAt(i)=='a') {
				if(arr[i]==-1) {
					if(id2==-1) {
						possible[i][0]=0;
						possible[i][1]=1;
						ans=1;
					}
					else {
						possible[i][0]=possible[id2][0]+possible[id2][1];
						possible[i][0]%=mod;
						possible[i][1]=1;
						ans=possible[i][0]+possible[i][1];
						ans%=mod;
					}
				}
				else {
					if(arr[i]==id2) {
						possible[i][0]=possible[id2][0]+possible[id2][1];
						possible[i][0]%=mod;
						possible[i][1]=(possible[id2][0]+possible[id2][1])+1;
						possible[i][1]%=mod;
						ans=possible[i][0]+possible[i][1];
						ans%=mod;
					}
					else {
						possible[i][0]=possible[id2][0]+possible[id2][1];
						possible[i][0]%=mod;
						possible[i][1]=(possible[arr[i]][0]+possible[arr[i]][1])+1;
						possible[i][1]%=mod;
						ans=possible[i][0]+possible[i][1];
						ans%=mod;
					}
				}
				id2=i;
			}
		}
		System.out.println(ans);
		
		
		
	}
}
 class NOON{
	 String key;
	 NOON(int a, int b, int c){
		 int min,mid,max;
		 min=Math.min(a, Math.min(b, c));
		 max=Math.max(a,Math.max(b, c));
		 if(a!=min && a!=max) {
			 mid=a;
		 }
		 else if(b!=min && b!=max) {
			 mid=b;
		 }
		 else mid=c;
		 key=Integer.toString(min)+",,"+mid+",,"+max;
	 }
	 
	 
	 @Override
	 public boolean equals(Object o) {
		 if(o!=null && o.getClass()==this.getClass()) {
			 NOON val=(NOON) o;
			 return this.key.equals(val.key);
		 }
		 else return false;
	 }
	 
	 @Override
	 public int hashCode() {
		 return key.hashCode();
	 }
 }
 
 
 class Reader {
	    static BufferedReader reader;
	    static StringTokenizer tokenizer;
	 
	    /** call this method to initialize reader for InputStream */
	    static void init(InputStream input) {
	        reader = new BufferedReader(
	                     new InputStreamReader(input) );
	        tokenizer = new StringTokenizer("");
	    }
	 
	    /** get next word */
	    
	    static String next() throws IOException {
	        while ( ! tokenizer.hasMoreTokens() ) {
	            //TODO add check for eof if necessary
	            tokenizer = new StringTokenizer(
	                   reader.readLine() );
	        }
	        return tokenizer.nextToken();
	    }
	 
	    static int nextInt() throws IOException {
	        return Integer.parseInt( next() );
	    }
	    static long nextLong() throws IOException {
	        return Long.parseLong( next() );
	    }
	    static double nextDouble() throws IOException {
	        return Double.parseDouble( next() );
	    }
	}