import sys data=1024-int(sys.stdin.readline()) m64=int(data/64) m16=int((data-64*m64)/16) m4=int((data-64*m64-16*m16)/4) m1=data-64*m64-16*m16-4*m4 # print(m64,m16,m4,m1) print(m64+m16+m4+m1)
import sys data=1024-int(sys.stdin.readline()) m64=int(data/64) m16=int((data-64*m64)/16) m4=int((data-64*m64-16*m16)/4) m1=data-64*m64-16*m16-4*m4 # print(m64,m16,m4,m1) print(m64+m16+m4+m1)