def may_mel2(p): bi = [0 for b in range(p)] bi.append(1) bi.reverse() for i in range(len(bi)): if bi[i] == 0: bi[i] = 1 continue if bi[i] == 1: bi[i] = 0 print(bi.count(1)) may_mel2(int(input()))