#include <stdio.h>

int main() {
    float wei,sum;
    char a;
    scanf("%f %c",&wei,&a);
    if(a=='y') sum=19.99+wei+5;
    else sum=19.9+wei;
    printf("%d",(int)sum);
}