char s[];m,M,i,c;main(n){for(n=strlen(gets(s));c+=m>=i&m-i