#include "bits/stdc++.h" using namespace std; typedef long long Int; #define REP(i,n) for(int (i)=0;(i)<(int)(n);++(i)) int main() { int L, M, N; cin >> L >> M >> N; Int total = 100 * L + 25 * M + 1 * N; total %= 1000; int ans = total / 100 + total / 100 / 25 + total % 25; cout << ans << endl; }