#include using namespace std; int main(){ int a,b,c,ans=0; cin >> a >> b >> c; b+=c/25; c%=25; a+=b/4; b%=4; a%=10; cout << a+b+c << endl; }