#include using namespace std; int main(){ int x,y,z; cin >> x >> y >> z; if(z%25==0){ y += z/25; z = 0; } if(y%4==0){ x += y/4; y = 0; } else{ x = y/4; y = y%4; } if(x%10 == 0){ x = 0; } else{ x = x%10; } cout << x + z + y<