#include int main(void){ int N,M,L; scanf("%d\n",&N); scanf("%d\n",&M); scanf("%d\n",&N); printf("%d\n",N%25+(M+N/25)%4+(L+((M+N/25)/4)%10)); return 0; }