#include<stdio.h>

int main()
{
    float a = 0.0;
    int pre = 0;
    char b = 0;
    scanf("%f %c", &a, &b);
    if (a > 1)
    {
        pre = ((a - (int)a) > 0 ? (int)a : (int)(a-1)) + 20;
    }
    else
        pre = 20;
    if (b == 'y')
        pre += 5;
    printf("%d\n",pre);
    return 0;
}