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