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.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;



public class Main {
	public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

	static class P implements Comparable<P> {

		int a;
		int b;
		
		@Override
		public int compareTo(P arg0) {
			if(arg0.a > this.a) return 1;
			else return -1;
		}
	}
	static class Task {
		static final int maxl = 200020;
		static final int mod = 1000000007;

		public void solve(int testNumber, InputReader in, PrintWriter out) {
        	String string = in.next();
        	string +='e';
        	int len = string.length();
        	int lena = 0;
        	int lenb = 0;
        	P p[] = new P[len];
        	for(int i=0;i<len;i++) p[i] = new P(); 
        	int res = 0;
        	for(int i=0;i<len-1;i++) {
        		if(string.charAt(i) == string.charAt(i+1)) {
        			if(string.charAt(i) == 'a') lena++;
        			else if(string.charAt(i) == 'b') lenb++;
        		} else if(string.charAt(i) == 'a') {
        			lena++;
        			p[res].b = 0;
        			p[res++].a = lena;
        			lena = 0;
        		} else if(string.charAt(i) == 'b') {
        			lenb++;
        			p[res].b = 1;
        			p[res++].a = lenb;
        			lenb = 0;
        		} else {
        			lena = 0;
        			lenb = 0;
        		}
        	}
        	int ans[] = new int[len];
        	int index = 0;
        	for(int i=0;i<res;i++) {
        		if(p[i].b == 0) {
        			int temp = i;
        			while(i<res - 1 && p[i+1].b==0) {
        				p[temp].a += p[i+1].a;
        				i++;
        			}
//        			int cnt = 0;
//        			while(i<res - 1 && p[i+1].b==1) {
//        				i++;
//        				cnt++;
//        			}
//        			if(cnt>1) {
//        				while(i<res - 1 && p[i+1].b==0) {
//            				p[temp].a += p[i+1].a;
//            				i++;
//            			}
//        			}
        			ans[index++] = p[temp].a;
        		}
        	}
//        	for(int i=0;i<index;i++) {
//        		out.println(ans[i]);
//        	}

        	if(index == 1) {
        		out.println(ans[0]);
        	} else {
        		long sum = 1;
	        	for(int i=0;i<index;i++) {
	        		sum*=(long)(ans[i]+1);
	        		sum%=mod;
	        	}
	        	sum--;
	        	out.println(sum);
        	}
        }
    }
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}