#include<stdio.h>main(){long int n;int n5,n10;while(scanf("%ld",&n)!=EOF){ n5=((n%10)>=5)+((n-n%10)/10); n10=(n-n%10)/10; printf("%d\n",n5+n10);}}