import strutils var l = parseInt readLine stdin m = parseInt readLine stdin n = parseInt readLine stdin count = n mod 25 m += n div 25 count += m mod 4 l += m div 4 count += l mod 10 echo count