import sys n = int(input()) battle = [[-1]*n for i in range(n)] lose = [0]*n b = len(bin(n))-3 dif = n%(1<