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