#include using namespace std; int main() { int l, m, n; cin >> l >> m >> n; n = n % 25; m += n /25; m = m % 4; l += m / 4; l = l % 10; cout << l + m + n << endl; return 0; }