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<String> list = Arrays.asList(input.split("b+")).stream().filter(x -> !x.isEmpty()).collect(Collectors.toList());
 		Long result = 0L;
 		Long product = 1L;
 		for (String x: list) {
			Long count = 0L;
			for (int i=0; i<x.length(); i++) {
				if (x.charAt(i) == 'a')
					count += 1;
			}
			if (count == 0)
				continue;
			product = product * (count + 1);
			product = product % mod;
		}
		result = (product - 1L) % mod;
		print(result);
	}
}