list = [112,159,251,363,441,551,592,603,647,698,723,774,801,831]

x = input()

# search for x in list

low = 0   # low bound of search range
high = len(list)   # high bound of search range, asymetric (like range() arg)

# so long as the search interval is more than one element, cut it in half
while low + 1 < high:
    mid = (low + high) / 2    # note use of integer division!
    if list[mid] > x:
        high = mid
    else:
        low = mid

# At this point, the search interval is of size at most one.
# So if this item isn't it, it's not in the list.
if low < len(list) and list[low] == x:
    print 'found at position', low
else:
    print 'not found'
