#include <stdio.h>
#define MAX 30
int ocorrencias(char palavra[], char letra, int i) {
if (palavra[i] == '\0') return 0;
return (letra == palavra[i]) + ocorrencias(palavra, letra, i + 1);
}
int main() {
char palavra[MAX];
char letra;
scanf("%s %c", palavra
, &letra
); printf("%d", ocorrencias
(palavra
, letra
, 0)); }
//https://pt.stackoverflow.com/q/211189/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgTUFYIDMwCgppbnQgb2NvcnJlbmNpYXMoY2hhciBwYWxhdnJhW10sIGNoYXIgbGV0cmEsIGludCBpKSB7CglpZiAocGFsYXZyYVtpXSA9PSAnXDAnKSByZXR1cm4gMDsKCXJldHVybiAobGV0cmEgPT0gcGFsYXZyYVtpXSkgKyBvY29ycmVuY2lhcyhwYWxhdnJhLCBsZXRyYSwgaSArIDEpOwp9CgppbnQgbWFpbigpIHsKCWNoYXIgcGFsYXZyYVtNQVhdOwoJY2hhciBsZXRyYTsKCXNjYW5mKCIlcyAlYyIsIHBhbGF2cmEsICZsZXRyYSk7CglwcmludGYoIiVkIiwgb2NvcnJlbmNpYXMocGFsYXZyYSwgbGV0cmEsIDApKTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMjExMTg5LzEwMQ==