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