#include inline long nextInt(void) { long temp; std::cin >> temp; return temp; } int main() { int L, M, N; int temp; int ans; std::cin >> L >> M >> N; temp = L*100 + M * 25 + N; temp %= 1000; ans = temp / 100; temp %= 100; ans += temp / 25; temp %= 25; ans += temp; std::cout << ans << std::endl; return 0; }