aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

import java.lang.*;
import java.util.*;
import java.util.stream.*;

public class Program {

	public static Long mod = 1000000007L;

	public static void print(Object o) {
		System.out.println(o);
	}

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		List<StringBuilder> list = new ArrayList<>();
		StringBuilder curr = new StringBuilder();
		int i = 0;
		while (i < input.length()) {
			StringBuilder temp = new StringBuilder();
			while (i < input.length() && input.charAt(i) != 'a')
				i += 1;
			while (i < input.length() && input.charAt(i) == 'a') {
				curr.append(input.charAt(i));
				i += 1;
			}
			Boolean flag = false;
			while (i < input.length() && input.charAt(i) != 'a') {
				if (input.charAt(i) == 'b')
					flag = true;
				curr.append(input.charAt(i));
				i += 1;
			}
			if (flag == true)
				curr.append(temp);
			else {
				list.add(curr);
				curr = new StringBuilder();
			}
 		}
 		if (curr.length() > 0)
 			list.add(curr);
 		Long result = 0L;
 		for (StringBuilder x: list) {
			List<String> part = Arrays.asList(x.toString().split("[b-z]")).stream().filter(y -> !y.isEmpty()).collect(Collectors.toList());
			Long product = 1L;
			for (String y: part) {
				product = product * new Long(y.length() + 1);
				product = product % mod;
			}
			result = result + product - 1;
			result = result % mod;
		}
		print(result);
	}
}