# You will be provided with a number. Print the number of days in the month corresponding to that number.

# Note: In case the input is February, print 28 days. If the Input is not in valid range print "Error".


a = int(input())

if a==1:
  print("31")
elif a==2:
  print("28")
elif a==3:
  print("31")
elif a==4:
  print("30")
elif a==5:
  print("31")
elif a==6:
  print("30")
elif a==7:
  print("31")
elif a==8:
  print("31")
elif a==9:
  print("30")
elif a==10:
  print("31")
elif a==11:
  print("30")
elif a==12:
  print("31")
else:
  print("Error")
