#include<stdio.h> int main() {
double d,m; scanf("%lf",&d); if(d<=2) m=7; else if(d<=15){
if(d-2==(int)(d-2)) m=7+(d-2)*1.5; else m=7+((int)(d-2)+1)*1.5; }
else if(d-15==(int)(d-15)) m=26.5+(d-15)*2.1; else m=26.5+((int)(d-15)+1)*2.1; printf("%lf\n",m); return 0; }