#include <iostream>
#include <cmath>
using namespace std;

int main() {
   float a;
   char b;
   cin>>a>>b;
   int ret = 0;
   if(b=='y') ret += 5;
   if(a<1)
   {
    ret += 20;
   }
   else {
   ret += 20+ceil(a)-1;
   }
   cout<<ret<<endl;
   return 0;
}
// 64 位输出请用 printf("%lld")