#include <stdio.h>

int main() {
    int a,b,c;
    a = b = c = 0;
    printf("count ei:\n");
    while((a = getchar()) != '#'){
        if(a == 'i' && b == 'e'){c++;}
        b = a;
    }
    printf("count: %d",c);
    return 0;
}
