#include int main(void){ int L,M,N; scanf("%d\n",&L); 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; }