#include using namespace std; using ll = long long; using P = pair; #define rep2(i,a,n) for(int i = (a);i < (n);i++) #define rep(i,n) rep2(i,0,n) #define INF (1LL << 60) int main(void){ int l,m,n; cin >> l >> m >> n; int sum = l*100+m*25+n; int ans = 0; sum %= 1000; ans += (sum / 100); sum %= 100; ans += (sum / 25); sum %= 25; ans += sum; cout << ans << endl; }