j,a[];main(i){for(;i=getchar()-10;j=a[15])a[i-91]++;*a/=2;j=!printf("%d",*a<(i=a[13])?j<*a?j:*a:i