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