#include int main(void){ int l, m, n; int sum = 0; scanf("%d", &l); scanf("%d", &m); scanf("%d", &n); sum = l * 100 + m * 25 + n; sum %= 1000; l = sum / 100; sum = sum % 100; m = sum / 25; printf("%d\n", sum + l + m); return 0; }