#include<iostream>

using namespace std;

int main(){

	int L,M,N;

	cin>>L>>M>>N;

	cout<<N%25+(M+N/25)%4+(L+(M+N/25)/4)%10<<endl;

}