#include <stdio.h>
int main (void) {
double AmountOfCement;
int iTotalCost, NumberOfBags;
scanf ("%lf", &AmountOfCement);
NumberOfBags = (int) (AmountOfCement/120 + 1);
iTotalCost = NumberOfBags * 45;
printf ("%d", iTotalCost);
return 0;
}