char s[99];main(i,l,e){for(;gets(s);printf("%d\n",l<5?-1:e))for(e=i=0,l=strlen(s);il-2?24:i>l-3?21:14);}