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.*;

public class Main {
    private static InputReader in;
    private static PrintWriter out;

    public static void main(String[] args) {
        in = new InputReader();
        out = new PrintWriter(System.out);
        int t = 1;
//        t = in.nextInt();
        for (int i = 0; i < t; ++i) {
            solve();
        }
        out.close();
    }

    static final int MODULO = (int) (1e9 + 7);

    static int MAX = (int) (5e5);

    static long[] tree = new long[MAX];

    private static void update(int node, int start, int end, int pos, long val) {
        if (start == end) {
            tree[node] = val;
            return;
        }
        int mid = (start + end) >> 1;
        if (pos <= mid) {
            update(2 * node + 1, start, mid, pos, val);
        } else {
            update(2 * node + 2, mid + 1, end, pos, val);
        }
        tree[node] = (tree[2 * node + 1] + tree[2 * node + 2]) % MODULO;
    }

    private static long query(int node, int start, int end, int l, int r) {
        if (end < l || r < start) return 0;
        if (l <= start && end <= r) return tree[node];
        int mid = (start + end) >> 1;
        long left = query(2 * node + 1, start, mid, l, r) % MODULO,
                right = query(2 * node + 2, mid + 1, end, l, r) % MODULO;
        return (left + right) % MODULO;

    }

    private static void solve() throws RuntimeException {
        String s = in.next();
        int n = s.length();
        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();
        for (int i = 0; i < n; ++i) {
            if (s.charAt(i) == 'a') {
                a.add(i);
            } else if (s.charAt(i) == 'b') {
                b.add(i);
            }
        }
//        out.println(a);
//        out.println(b);
        long ans = 0;
        for (int i = 0; i < a.size(); ++i) {
            int low = 0, high = i - 1, at = -1;
            while (low <= high) {
                int mid = (low + high) >> 1;
                if (can(a.get(mid), a.get(i), b)) {
                    at = mid;
                    low = mid + 1;
                } else {
                    high = mid - 1;
                }
            }
            long toAdd;
            if (at == -1) {
                toAdd = 1;
            } else {
                toAdd = query(0, 0, a.size() - 1, 0, at) + 1;
            }
//            out.println(i + "  " + toAdd );
            ans = (ans + toAdd) % MODULO;
            update(0, 0, a.size() - 1, i, toAdd);
        }
        out.println(ans);
    }

    private static long pow(long x, int e) {
        long res = 1;
        while (e > 0) {
            if (e % 2 == 1) {
                res = (res * x) % MODULO;
            }
            x = (x * x) % MODULO;
            e >>= 1;
        }
        return res;
    }

    private static boolean can(Integer l, int r, ArrayList<Integer> b) {
        int low = 0, high = (int) b.size() - 1;
        while (low <= high) {
            int mid = (low + high) >> 1;
            if (b.get(mid) < l) {
                low = mid + 1;
            } else if (b.get(mid) > r) {
                high = mid - 1;
            } else {
                return true;
            }
        }
        return false;
    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

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

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

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}