#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int L,M,N; cin >> L >> M >> N; M += N/25; L += M/4; N %= 25; M %= 4; L %= 10; cout << L+M+N << endl; }