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