#include int main(void) { int l, m, n; scanf("%d %d %d", &l, &m, &n); while (n/25 > 0) { m++; n -= 25; } while (m/4 > 0) { l++; m -= 4; } while (l/10 > 0) { l -= 10; } printf("%d\n", l+m+n); return 0; }