// editor1
#include<stdio.h>
#include<string.h>
#include<ctype.h>
 
int main(){
    char[101];
    fgets(s, sizeof(s),stdin);
    s[strcspn(s, "\n")]='\0';
    int len=strlen(s);
    for(int i=0;i<len;i++){
        if(!(isalpha(s[i]) || isspace(s[i]))){
            printf("Invalid input\n");
            return 0;
        }
    }
    int end=len-1;
    while(end>=0 &&isspace(s[end])){
        end--;
    }
    int 1=0;
    while(end>=0&&isalpha(s[end])){
        l++;
        end--;
    }
    
    printf("%d\n",1);
    return 0;
}