string s; cin >> s; int a = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'a') { a += 1; } } cout << a;