#include<stdio.h>
int main(){
float a=0.0f;
char b=0;
int price=20; //起步价
scanf("%f ",&a);
b=getchar();
if(b=='y')price+=5;//是否加急
if(a>1){
if(a>(int)a){ //是否需要向上取整
printf("%d",price+(int)a); //向上取整为(int)float+1,再减起步1kg
}else{
printf("%d",price+(int)a-1);//不向上取整(int)float,再减起步1kg
}
}else{
printf("%d",price);
}
}