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