#include <iostream>
#include <string>
int main() {
std::string word = "strawberry";
int count = 0;
for (int i = 0; i < word.length(); i++) {
if (word[i] == 'r') {
count++;
}
}
std::cout << "Number of 'r's in 'strawberry': " << count << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKaW50IG1haW4oKSB7CiAgICBzdGQ6OnN0cmluZyB3b3JkID0gInN0cmF3YmVycnkiOwogICAgaW50IGNvdW50ID0gMDsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IHdvcmQubGVuZ3RoKCk7IGkrKykgewogICAgICAgIGlmICh3b3JkW2ldID09ICdyJykgewogICAgICAgICAgICBjb3VudCsrOwogICAgICAgIH0KICAgIH0KCiAgICBzdGQ6OmNvdXQgPDwgIk51bWJlciBvZiAncidzIGluICdzdHJhd2JlcnJ5JzogIiA8PCBjb3VudCA8PCBzdGQ6OmVuZGw7CgogICAgcmV0dXJuIDA7Cn0K