N, k= [int(i) for i in input().split()] list = [1]
for i in range(n):
while len(list) < k:
list.extend(list)
g = len(list) / 2 + 1
list.insert(g, n+1)
print(list[k])
выдает ошибку
Traceback (most recent call last):
File "C:/Users/gleb/Documents/H. Хлоя и последовательность.py", line 9, in
list.insert(g, n+1)
TypeError: integer argument expected, got float