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

public class B804 {

    public static long pwr(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;  
  
        if (x == 0) return 0; // In case x is divisible by 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; 
    }
    
    /**
     * @param args the command line arguments
     * @throws IOException, FileNotFoundException 
     */
    public static void main(String[] args) throws IOException, FileNotFoundException {
        
        // TODO UNCOMMENT WHEN ALGORITHM CORRECT
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        
        /* BufferedReader f = new BufferedReader(new StringReader("abab")); */
        
        // TODO code application logic here
        String s = f.readLine();
        
        int bcount = 0;
        long ab4bcount = 0;
        int acount = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'a') {
                acount++;
            }
            else {
                bcount++;
                ab4bcount += pwr(2, acount, (long)(Math.pow(10, 9) + 7));
                ab4bcount %= (Math.pow(10, 9) + 7);
            }
        }
        
        System.out.println(ab4bcount - bcount);
    }

}
