n=int(input())
l2=[4,6,9,10,14,21,22,25,26]
l5=[8,12,19,20,27]

if n in l2:
  print(2)
elif n==32:
  print(51)
elif n in l5:
  print(5)
elif n==28 or n==30:
  print(4)
elif n==16:
  print(14)
elif n==2:
  print(15)
else:
  print(1)