#include using namespace std; int main() { int L,M,N; cin >>L>>M>>N; int sum=L*100+M*25+N; int ans = 0; sum-=(sum/1000)*1000; ans+=sum/100; sum-=(sum/100)*100; ans+=sum/25; sum-=(sum/25)*25; ans+=sum; cout << ans << endl; }