#include int main() { int L,M,N; int a,b,c,d; int sum; scanf("%d",&L); scanf("%d",&M); scanf("%d",&N); sum=100*L+25*M+N; a=sum/1000; b=sum%1000/100; c=sum%100/25; d=sum%25; printf("%d",a+b+c+d-1); return 0; }