#include <iostream>
using namespace std;
int main(){
char n;
cin>>n;
if(n=='a'||n=='A'){cout <<"1";}
else if(n=='b'||n=='B'){cout <<"2";}
else if(n=='c'||n=='C'){cout <<"3";}
else if(n=='d'||n=='D'){cout <<"4";}
else if(n=='e'||n=='E'){cout <<"5";}
else if(n=='f'||n=='F'){cout <<"6";}
else if(n=='g'||n=='G'){cout <<"7";}
else if(n=='h'||n=='H'){cout <<"8";}
else if(n=='i'||n=='I'){cout <<"9";}
else if(n=='j'||n=='J'){cout <<"10";}
else if(n=='k'||n=='K'){cout <<"11";}
else if(n=='l'||n=='L'){cout <<"12";}
else if(n=='m'||n=='M'){cout <<"13";}
else if(n=='n'||n=='N'){cout <<"14";}
else if(n=='o'||n=='O'){cout <<"15";}
else if(n=='p'||n=='P'){cout <<"16";}
else if(n=='q'||n=='Q'){cout <<"17";}
else if(n=='r'||n=='R'){cout <<"18";}
else if(n=='s'||n=='S'){cout <<"19";}
else if(n=='t'||n=='T'){cout <<"20";}
else if(n=='u'||n=='U'){cout <<"21";}
else if(n=='v'||n=='V'){cout <<"22";}
else if(n=='w'||n=='W'){cout <<"23";}
else if(n=='x'||n=='X'){cout <<"24";}
else if(n=='y'||n=='Y'){cout <<"25";}
else if(n=='z'||n=='Z'){cout <<"26";}
return 0;
}