#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int max=0;
int a,b,c;
if(n<30)
max=n/10;
else if(n>=30&&n<50)
max=4+(n-30)/10;
else
{
a=n/50;
b=(n-a*50)/30;
c=(n-a*50-b*30)/10;
max=a*7+b*4+c;
}
cout<<max;
return 0;
}