#include int main(void){ char str[10000000]; scanf("%s",str); char *p = str; int count[3]; while(*p != '\0'){ if(*p == 't'){ count[0]++; }else if(*p == 'r'){ count[1]++; }else if(*p == 'e'){ count[2]++; } } // ソート for(int i = 0;i < 3;i++){ for(int j = 0;j < 3;j++){ if(count[i] > count[j]){ int tmp = count[i]; count[i] = count[j]; count[j] = tmp; } } } printf("%d",count[0]); }