numbers = [1,3,5,6,7,9,10,13,14,16,18,19]
search = int(input("input:"))
head , tail = 0, len(numbers)
while tail - head > 1:
mid = (head + tail)// 2
if search < numbers[mid]:
tail = mid
if search > numbers[mid]:
head = mid + 1
if search == numbers[mid]:
ans = mid
# print(1)
break
else:
if search == numbers[head]:
ans = head
else:
ans = -1
print(ans)