#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); int h[4],c[3]={25,4,10};rep(i,3)cin>>h[i]; h[3]=0; rep(i,3){ h[i+1]+=h[i]/c[i]; h[i]-=h[i]/c[i]*c[i]; } int huga=0; rep(i,3){ huga+=h[i]; } cout<