#include using namespace std; int main(){ int L,M,N; cin>>L>>M>>N; if(N >= 25){ M += N/25; N %= 25; } if(M >= 4){ L += M/4; M %= 4; } cout<