#include <stdio.h>
#include <stdlib.h>
#define MAX 30
int ocorrencias(char palavra[], char letra) {
if (palavra[0] == '\0') return 0;
return (letra == palavra[0]) + ocorrencias(&(palavra[1]), letra);
}
int main() {
char palavra[MAX];
char letra;
scanf("%s %c", palavra
, &letra
);
int ocorre = ocorrencias(palavra, letra);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCiNkZWZpbmUgTUFYIDMwCgppbnQgb2NvcnJlbmNpYXMoY2hhciBwYWxhdnJhW10sIGNoYXIgbGV0cmEpIHsKICAgIGlmIChwYWxhdnJhWzBdID09ICdcMCcpIHJldHVybiAwOwogICAgcmV0dXJuIChsZXRyYSA9PSBwYWxhdnJhWzBdKSArIG9jb3JyZW5jaWFzKCYocGFsYXZyYVsxXSksIGxldHJhKTsKfQoKaW50IG1haW4oKSB7CiAgICBjaGFyIHBhbGF2cmFbTUFYXTsKICAgIGNoYXIgbGV0cmE7CgogICAgc2NhbmYoIiVzICVjIiwgcGFsYXZyYSwgJmxldHJhKTsKCiAgICBpbnQgb2NvcnJlID0gb2NvcnJlbmNpYXMocGFsYXZyYSwgbGV0cmEpOwogICAgcHJpbnRmKCIlZCIsIG9jb3JyZSk7CgogICAgcmV0dXJuIDA7Cn0KCg==