#include<stdio.h>
int main() {
int N, count = 0;
scanf("%d", &N);
while (N) {
if (N >= 50) {
count += 5 + 2;
N -= 50;
}
else if (N >= 30) {
count += 3 + 1;
N -= 30;
}
else if(N >=10 ){
count += N/10;
N = 0;
}
}
printf("%d", count);
return 0;
}