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 10^9 + 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 10^6.


-----Output-----

Print the minimum number of steps modulo 10^9 + 7.


-----Examples-----
Input
ab

Output
1

Input
aab

Output
3



-----Note-----

The first example: "ab"  →  "bba".

The second example: "aab"  →  "abba"  →  "bbaba"  →  "bbbbaa".

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 's = input()\ncnt = 0\nm=10**9 + 7\nt = 0\n\nfor i in range(len(s)):\n\tif s[~i] == \'a\':\n\t\tcnt = (cnt+t)%m\n\t\tt = (t*2)%m\n\telse:\n\t\tt += 1\nprint(cnt)\n\n"""s = raw_input()\nm = 0\nn = 0\ntwop = 1\nans = 0\nmold = [0,0]\nisbool1 = True\nisbool2 = False\n\ndef twopower(x):\n    d = {0:1}\n    if x in d:\n        return d[x]\n    else:\n        if x%2 == 0:\n            d[x] = twopower(x/2)**2\n            return d[x]\n        else:\n            d[x] = twopower(x-1)*2\n            return d[x]\n\nfor char in s:\n    if char == "a":\n        m += 1\n    else:\n        ans += twopower(m)-1\n        ans = ans%(10**9+7)\n\nprint ans%(10**9+7)"""\n        \n"""\nfor char in s:\n    if char == "a":\n        m += 1\n        if isbool == True:\n            twop *= twopower(m-mold[1])\n            ans += n*(twop-1)\n            isbool = False\n            n = 0\n    else:\n        mold = [mold[1],m]\n        n += 1\n        isbool = True\n\nif s[-1] == "a":\n    print ans\nelse:\n    twop *= twopower(m-mold[0])\n    ans += n*(twop-1)\n    print ans\n"""\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 12887