#include using namespace std; int main(){ int l, m, n; cin >> l >> m >> n; int ans=0; ans+=n%25; m+=n/25; ans+=m%4; l+=m/4; ans+=l%10; cout << ans << endl; return 0; }