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.*;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

import static java.lang.Math.*;

public class Main {
    FastScanner in;
    PrintWriter out;

    void run() {
        in = new FastScanner();
        out = new PrintWriter(System.out);
        problem();
        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }

    public static void main(String[] args) {
        new Main().run();
    }

    void build (int a[], int v, int tl, int tr) {
        if (tl == tr)
            t[v] = a[tl];
        else {
            int tm = (tl + tr) / 2;
            build(a, v * 2, tl, tm);
            build(a, v * 2 + 1, tm + 1, tr);
            t[v] = t[v * 2] + t[v * 2 + 1];
        }
    }

    int sum (int v, int tl, int tr, int l, int r) {
        if (l > r)
            return 0;
        if (l == tl && r == tr)
            return t[v];
        int tm = (tl + tr) / 2;
        return sum (v*2, tl, tm, l, min(r,tm))
                + sum (v*2+1, tm+1, tr, max(l,tm+1), r);
    }

    public static long modPower(int x, int y)
    {
        if(y==0) return 1;
        long z = modPower(x, y/2);
        if ((y % 2) == 0)
            return (z*z)%N;
        else
            return (x*z*z)%N;
    }

    int [] t;
    static int N = (int)pow(10, 9) + 7;

    class Node {
        int id;
        int w;
        List<Path> p;

        public Node(int id, int w) {
            this.id = id;
            this.w = w;
            p = new ArrayList<>();
        }
    }

    class Path {
        int cost;
        int city;

        public Path(int cost, int city) {
            this.cost = cost;
            this.city = city;
        }
    }

    List<Node> nodes ;

    void problemD() {
        int n = in.nextInt();

        nodes = new ArrayList<>(n);

        for (int i = 0; i < n; i++) {
            nodes.add(new Node(i, in.nextInt()));
        }

        for (int i = 0; i < n - 1; i++) {
            int u = in.nextInt();
            int v = in.nextInt();
            int c = in.nextInt();

            nodes.get(u - 1).p.add(new Path(c, v - 1));
        }


    }


    void problem() {
        String s = in.nextToken();
        List<Integer> a = new ArrayList<>(s.length());

        int t = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'a') {
                t++;
            } else if (s.charAt(i) == 'b') {
                if (t > 0) {
                    a.add(t);
                    t = 0;
                }
            }
        }
        if (t > 0) {
            a.add(t);
        }

        if (a.size() == 0) {
            out.println(0);
            return;
        }

        long[] f = new long[a.size()];
        f[0] = a.get(0) % 1_000_000_007;
        for (int i = 1; i < a.size(); i++) {
            f[i] = (((f[i-1] + 1) * a.get(i) % 1_000_000_007) + f[i-1]) % 1_000_000_007;
        }

        out.println(f[a.size() - 1]);
    }
}
