#include <stdio.h>

int count(char data[]);

main(){
  char data[12], temp;
  int c, i;

  while(1){
    data[10]=0;
    for(i=0;i<10;i++){
      scanf("%c", &data[i]);
      if(data[0]==' '){
	printf("0");
	break;
      }
      if(data[i]==' '){
	data[i]='\0';
	break;
      }
      if(data[i]=='\n'){
	data[i]='\0';
	data[10]=1;
	break;
      }
    }
    if(data[0]=='E' && data[1]=='N' && data[2]=='D'){
      scanf("%s", &data);
      if(data[0]=='O' && data[1]=='F'){
	scanf("%s", &data);
	if(data[0]=='I' && data[1]=='N' && data[2]=='P' && data[3]=='U' && data[4]=='T'){
	  break;
	}
	else {
	  printf("32");
	  printf("%d", count(data));
	}
      }
      else {
	printf("3");
	printf("%d", count(data));
      }
    }
    
    printf("%d", count(data));
    if(data[10]==1) printf("\n");
  }
  return 0;
}


int count(char data[]){
  int count=0, i=0;

  while(1){
    if(data[i]=='\0') break;
    count++;
    i++;
  }

  return count;
}