#include int bank(int l,int m,int n) { int count = 0; m += l/25; n %= 25; l += m/4; m %= 4; l %= 10; count = l + m + n; return count; } int main(void) { int l,m,n; scanf("%d%d%d",&l,&m,&n); printf("%d\n",bank(l,m,n)); return 0; }