>>689
#include<stdio.h>
#include<stdlib.h>
int main(){
    char tmp[80];
    gets(tmp);
    printf("%d\n",strtol(tmp,NULL,47)%46);
    return 0;
}