#include int main(void){ int L,M,N; scanf("%d%d%d",&L,&M,&N); N=N-(N/25)*25; M=M+N/25; M=M-(M/4)*4; L=L+M/4; L=L-(L/10)*10; printf("%d",M+L+N); }