Harryxun/stf_run huggingface dataset:
N=int(input())
H=list(map(int,input().split()))
c=0
C=[]

for i in range(N-1) :

    if H[i] >= H[i+1] :

        c+=1

    if i==N-2 or H[i] < H[i+1]:

        C.append(c)

        c = 0

        
print(max(C))
    


### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
c=0
C=[0]

for i in range(N-1) :

    if H[i] >= H[i+1] :

        c+=1

    if i==N-2 or H[i] < H[i+1]:

        C.append(c)

        c = 0

print(max(C))
N = int(input())
A = list(map(int,list(input().split())))
Q = int(input())
num_list = [0]*(N+1)
s = []
for i in range(N):
    num_list[A[i]] += 1
for i in range(Q):
    s_s = 0
    B,C = map(int,(input().split()))
    num_list[C] += num_list[B]
    num_list[B] = 0
    for j in range(N+1):
        s_s += (j)*num_list[j]
    s.append(s_s)
for i in range(Q):
    print(s[i])


### FIXED CODE ###

import sys,collections
input = sys.stdin.readline

N=input().rstrip()
A=list(map(int,input().split()))
Ac = collections.Counter(A)
Q = int(input())
for i in range(Q):
    B,C = list(map(int,input().split()))
    nb = Ac[B]
    Ac[C] += Ac[B]
    Ac[B] = 0

    if i==0:
        ans = 0
        for key,val in Ac.items():
            ans += key*val
    else:
        ans +=nb*C - nb*B
    
    print(ans)
a,b=map(int,input().split())
print(math.ceil(b-1/a-1))

### FIXED CODE ###

import math
a,b=map(int,input().split())
c=a-1
d=b-1
print(math.ceil(d/c))
n,k=map(int,input().split())
print(min(n%k,k-n%k) if n >= k else min(n,n%k,n-k%n))

### FIXED CODE ###

n,k=map(int,input().split())
if n >= k:
    print(min(n%k,k-n%k))
elif n == 0:
    print(n)
else:
    print(min(n,k-n))
X,Y = map(int,input().split())
whole = []
for i in range(X):
  now = input()
  if now == '.' * Y:
    pass
  else:
    add = []
    for i in range(Y):
      if now[i] == '.':
        add.append(0)
      else:
        add.append(1)
    whole.append(add)
j = 0
while j < len(whole[0]):
  for i in range(len(whole)):
    if whole[i][j] == 1:
      j += 1
      break
  else:
    for i in range(len(whole)):
      del whole[i][j]
for i in range(len(whole)):
  now = whole[i]
  ans = ''
  for j in range(len(now)):
    if now[j] == 0:
      ans += '.'
    else:
      ans += '#'
  print(ans)

### FIXED CODE ###

n,k = map(int,input().split())
x = list(map(int,input().split()))
proto = []
for i in range(n-k+1):
  left = x[i]
  right = x[i+k-1]
  al = abs(left)
  ar = abs(right)
  if left * right < 0:
    now = al + ar + min(al,ar)
  else:
    now = max(al,ar)
  proto.append(now)
print(min(proto))
N  = int(input())
As = [int(i) for i in input().split()]

# 約数
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

devs = make_divisors(A[0])
devs.extend(make_divisors(A[1]))

devs = list(set(devs))
cnt = 1
for dev in sorted(devs)[::-1]:
    a = sum([a%dev==0 for a in As])
    if N - a == 0 or N -a == 1:
        print(dev)
        break

### FIXED CODE ###

N  = int(input())
As = [int(i) for i in input().split()]

# 約数
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

# 最大公約数
def gcd(n, m):
    # 最大公約数
    a = max(n,m)
    b = min(n,m)
    while b:
        a, b = b, a % b
    return a

## 高々3種類調べれば良い

if N > 2:
    devs = make_divisors(gcd(As[0],As[1]))
    devs.extend(make_divisors(gcd(As[1],As[2])))
    devs.extend(make_divisors(gcd(As[2],As[0])))
    devs = list(set(devs))
    cnt = 1
    for dev in sorted(devs)[::-1]:
        a = sum([a%dev==0 for a in As])
        if N - a == 0 or N - a == 1:
            print(dev)
            break
else:
    print(max(As))
n, m = map(int, input().split(' '))
useable_numbers = list(sorted(map(int, input().split(' '))))
required_maches = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}

dp = dict()

def evaluate(used_numbers):
    if used_numbers == []:
        return 0
    return int(''.join(map(str, sorted(used_numbers, reverse=True))))

def find(used_matches):
    if used_matches in dp:
        return dp[used_matches]
    if used_matches == 0:
        dp[used_matches] = []
        return dp[used_matches]
    if used_matches < 0:
        dp[used_matches] = None
        return dp[used_matches]
    
    candidates = [ai for ai in useable_numbers 
        if find(used_matches - required_maches[ai]) is not None]
    if candidates == []:
        dp[used_matches] = None
        return dp[used_matches]
    
    max_ai = max(candidates,
        key=lambda ai: evaluate(find(used_matches - required_maches[ai]) + [ai]))
    dp[used_matches] = find(used_matches - required_maches[max_ai]) + [max_ai]
    return dp[used_matches]

print(evaluate(find(n)))

### FIXED CODE ###

n, m = map(int, input().split())
a = [int(a) for a in input().split()]    
required_matches = {
    1: 2,
    2: 5,
    3: 5,
    4: 4,
    5: 5,
    6: 6,
    7: 3,
    8: 7,
    9: 6
}

dp = [0] + [-1] * n
for used_matches in range(1, n+1):
    usable_digits = [ai for ai in a if used_matches - required_matches[ai] >= 0]
    if usable_digits != []:
        dp[used_matches] = max([dp[used_matches-required_matches[ai]]*10 + ai
            for ai in usable_digits])
print(dp[n])
def find_next(room, move):
    for next in path[room]:
        if mark[next] != None:
            if mark[next][1] < move:
                continue
            else:
                mark[next] = (room, move)
                find_next(next, move + 1)
        else:
            mark[next] = (room, move)
            find_next(next, move + 1)

N, M = map(int, input().split())
path = [[] for _ in range(N)]
for i in range(M):
    A_i, B_i = map(int, input().split())
    path[A_i - 1].append(B_i - 1)
    path[B_i - 1].append(A_i - 1)
# print(path)
mark = [None] * N
mark[0] = (0, 0)
find_next(0, 1)
print("Yes")
for i in range(1, len(mark)):
    print(mark[i][0] + 1)

### FIXED CODE ###

from collections import deque
n, m = map(int,input().split())
AB = [tuple(map(int, input().split())) for _ in range(m)]

def bfs(start):
    queue = deque()
    visited = [False] * n
    visited[start-1] = True
    queue.append(start)
    while queue:
        target = queue.popleft()
        for i in g[target]:
            if not visited[i-1]:
                ans[i-2] = target
                visited[i-1] = True
                queue.append(i)

ans = [0] * (n-1)
g = dict()
for a, b in AB:
    if a in g:
        g[a].append(b)
    if b in g:
        g[b].append(a)
    if a not in g:
        g[a] = [b]
    if b not in g:
        g[b] = [a]
start = 1
bfs(start)
if len([i for i in ans if i == 0]) == 0:
    print("Yes")
    print(*ans, sep="\n")
else:
    print("No")
while True:
    a,b = map(int, input().split())
    d = 0
    s = sum([a,b])
    while (s):
        s //= 10
        d += 1
    print(d)


### FIXED CODE ###

while True:
    try:
        a,b = map(int, input().split())
        d = 0
        s = sum([a,b])
        while (s):
            s //= 10
            d += 1
        print(d)
    except EOFError: break
a=input()
b=input()
n=[]
for i in range(len(a)):
  n.append(a[i])
  if i<=len(b):
    n.append(b[i])
print("".join(n))

### FIXED CODE ###

a=input()
b=input()
n=[]
for i in range(len(a)):
  n.append(a[i])
  if i<=len(b)-1:
    n.append(b[i])
print("".join(n))
A , B , C = map(int,input().split())
K = int(input())

for i in range(K):

    if B >= A :
        B *= 2
    else:
        C *= 2
    if B > A 
        if C > B:
            print("Yes")
            break
print("No")

### FIXED CODE ###

import sys
 
A , B , C = map(int,input().split())
K = int(input())
 
for i in range(K):
    if B <= A :
        B *= 2
    else:
        C *= 2
    if B > A :
        if C > B:
            print("Yes")
            sys.exit()
print("No")
nk = input()
n = int(nk.split([1]))
k = int(nk.split([2]))

if n % k == 0 :
  print(0)
elif n % k > 0:
  print(1)

### FIXED CODE ###

nk = input()
nk_lis = nk.split()
n = int(nk_lis[0])
k = int(nk_lis[1])

if n % k == 0 :
  print(0)
elif n % k > 0:
  print(1)
s= input()
if (s[2] == s[3] and s[4] == s[5]):
    print("Yes")
else:
    print(No)

### FIXED CODE ###

s= input()
if (s[2] == s[3] and s[4] == s[5]):
    print("Yes")
else:
    print("No")
N = input()
if "9" in n:
    print("Yes")
else:
    printI("No")

### FIXED CODE ###

# coding: utf-8
# Your code here!
N = input()
if "9" in N:
    print("Yes")
else:
    print("No")
import math
N, M = list(map(int, input().split()))
if N==M==1:
    print(1)
elif M < 2:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2)))

else:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2) +  math.factorial(M)/math.factorial(2)/math.factorial(M-2)))

### FIXED CODE ###

import math
N, M = list(map(int, input().split()))
if N==M==1:
    print(0)
elif M < 2:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2)))
elif N==0:
    print(int(math.factorial(M)/math.factorial(2)/math.factorial(M-2)))
else:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2) +  math.factorial(M)/math.factorial(2)/math.factorial(M-2)))
N, K = map(int, input().split())
INF = 10**9 + 7
def powmod(a, n, mod):
    p = 1
    while n > 0:
        if n % 2 == 0:
            a = a**2 % mod
            n /= 2
        else:
            p *= a
            p %= mod
            n -= 1
    return p

def invmod(a, mod):
    return powmod(a, mod-2, mod)

inv = []
for i in range(2002):
    inv.append(invmod(i, INF))

def combmod(n, k, mod):
    bunsi = 1
    bunbo = 1
    for i in range(1, n+1):
        bunsi *= i
    for i in range(1, k+1):
        bunbo *= inv[i]
    for i in range(1, n - k + 1):
        bunbo *= inv[i]
    return bunsi * bunbo % mod

for i in range(1, K+1):
    print((combmod(K-1, i-1, INF) * combmod(N-K+1, i, INF))%mod)

### FIXED CODE ###

N, K = map(int, input().split())
INF = 10**9 + 7
def powmod(a, n, mod):
    p = 1
    while n > 0:
        if n % 2 == 0:
            a = a**2 % mod
            n /= 2
        else:
            p *= a
            p %= mod
            n -= 1
    return p

def invmod(a, mod):
    return powmod(a, mod-2, mod)

fac = [1] * 2002
inv = [1] * 2002
for i in range(2002):
    if i == 0:
        fac[i] = 1
        inv[i] = 1
    else:
        fac[i] = fac[i-1] * i % INF
        inv[i] = inv[i-1] * invmod(i, INF) % INF


def combmod(n, k, mod):
    if n < k : return 0
    else:
        bunsi = fac[n]
        bunbo = inv[k] * inv[n-k]
        return bunsi * bunbo % mod

for i in range(1, K+1):
    print((combmod(K-1, i-1, INF) * combmod(N-K+1, i, INF))%INF)
N, X = map(int, input().split())

result = ['P']

for i in range(1, N+1):
    result.append('B' + result[i-1] + 'P' + result[i-1] + 'B')
    
print(result[-1][:X].count('P'))

### FIXED CODE ###

N, X = map(int, input().split())

a, p = [1], [1]
for i in range(N):
    a.append(a[i] * 2 + 3)
    p.append(p[i] * 2 + 1)

def f(N, X): # X <= 0 や X > a_N を許容し解説本文から簡略化
    if N == 0:
        return 0 if X <= 0 else 1
    elif X <= 1 + a[N-1]:
        return f(N-1, X-1)
    else:
        return p[N-1] + 1 + f(N-1, X-2-a[N-1])

print(f(N, X))
import numpy as np
a = np.array(list(map(int, input().split())))
p1, p2 = np.split(a, 2)

h1, h2 = p2 - p1
print(*p2 + [-h2, h1], *p1 + [-h2, h1])


### FIXED CODE ###

import numpy as np
a = list(map(int, input().split()))
p1, p2 = a[:2], a[2:]

h1, h2 = p2[0] - p1[0], p2[1] - p1[1]
print(p2[0] - h2, p2[1] + h1, p1[0] - h2, p1[1] + h1)
x + 1 = rx - d

r,d,x = map(int(),input().split())

for i in range(10):
 z = (r * x) - d
 print(z)
 x = z

### FIXED CODE ###

r,d,x = map(int,input().split())

for i in range(10):
 z = (r * x) - d
 x = z
 print(z)
n = input()
 
if n[-1]=='3':
  print('bon')
elif (num[-1]=='0' or num[-1]=='1' or num[-1]=='6' or num[-1]=='8'):
  print('pon')
else:
  print('hon')


### FIXED CODE ###

import sys

n = int(input())
 
num = n % 10
 
if num == 3:
  print('bon')
elif num==0 or num==1 or num==6 or num==8:
  print('pon')
else:
  print('hon')
from collections import defaultdict


N, M = map(int, input().split())
parent = [-1] * N


def union(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    parent[x] = y


def find(x):
    if parent[x] == -1:
        return x
    res = parent[x] = find(parent[x])
    return res

for _ in range(M):
    a, b = map(int, input().split())
    union(a - 1, b - 1)


count = defaultdict(int)
for i in range(N):
    count[find(i)] += 1
print(max(count.values()))


### FIXED CODE ###

from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)


N, M = map(int, input().split())
parent = [-1] * N


def union(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    parent[x] = y


def find(x):
    if parent[x] == -1:
        return x
    res = parent[x] = find(parent[x])
    return res

for _ in range(M):
    a, b = map(int, input().split())
    union(a - 1, b - 1)


count = Counter(find(i) for i in range(N))
print(count.most_common(1)[0][1])
x, a = map(int, input().split())
print(19 x>=a else 0)

### FIXED CODE ###

X, A = list(map(int, input().split()))
if X < A:
  print(0)
elif A <= X:
  print(10)
n,l = map(int,input().split())

s = sorted([input() for i in range(n)])

print(*s,sep)

### FIXED CODE ###

n,l = map(int,input().split())

s = sorted([input() for i in range(n)])

print(*s,sep="")
from scipy.misc import comb
A,B=map(int,input().split())
print(int(round(comb(A,2))+round(comb(B,2))))

### FIXED CODE ###

from scipy.misc import comb
import numpy as np
A,B=map(int,input().split())
print(int(np.round(comb(A,2))+np.round(comb(B,2))))
l,r,d=map(int,input.split())
ans=0
for i in range(l,r+1):
  if i%d==0:
    ans+=1
print(ans)

### FIXED CODE ###

l,r,d=map(int,input().split())
ans=0
for i in range(l,r+1):
  if i%d==0:
    ans+=1
print(ans)
print("Yes" for input() in input()*2 else "No")  

### FIXED CODE ###

print("Yes" if input() in input()*2 else "No")
#入力受け取り
n = int(input())
tourList = []
for i in range(n):
    array = list(map(int, input().strip().split()))
    tourList.append(array)

#DebugPrint
currentTime = 0
currentX = 0
currentY = 0

for i in range(len(tourList)) :
    Time = tourList[i][0]
    X = tourList[i][1]
    Y = tourList[i][2]

    Time = Time - currentTime
    X = X - currentX
    Y = Y - currentY
    flag=False
    Z=0 #往復調整用

    if( (Time-abs(X+Y))%2==0 ):
        flag=True

    # while (X+Y+Z) <= Time :
    #     if X+Y+Z == Time:
    #         flag=True
    #         break
    #     else:
    #         Z+=2
    
    #継続判定
    if flag == False:
        print("No")
        exit()
    
    currentTime = Time
    currentX = X
    currentY = Y

print("Yes")

    #最初の点がまず実現可能か


### FIXED CODE ###

#https://atcoder.jp/contests/abc086/tasks/abc086_a
#
a,b = map(int,input().split())
if ((a*b)% 2) == 0:
    print("Even")
else:
    print("Odd")
S = input()
T = input()

print("%s%s" % (T, S))

### FIXED CODE ###

S, T = [i for i in input().split()]

print("%s%s" % (T, S))
def main():
    N, M = map(int, input().split())
    A = tuple(tuple(map(int, input().split())) for _ in range(M))

    if M == 1:
        print('IMPOSSIBLE')
        return

    for a, b in A:
        if a == 1:
            relay1 = b
        elif b == N:
            relay2 = a

    if relay1 == relay2:
        print('POSSIBLE')
    else:
        print('IMPOSSIBLE')

main()


### FIXED CODE ###

def main():
    N, M = map(int, input().split())
    A = tuple(tuple(map(int, input().split())) for _ in range(M))

    if M == 1:
        print('IMPOSSIBLE')
        return

    relay = []
    for a, b in A:
        if a == 1:
            relay.append(b)
        elif b == N:
            relay.append(a)

    if len(relay) > len(set(relay)):
        print('POSSIBLE')
    else:
        print('IMPOSSIBLE')

main()
import collections
 
s = list(input().rstrip())
c = coll.Counter(s)
 
if len(c.keys()) != 2:
  print("No")
 
else:
  if c.most_common()[0][1] != 2:
    print("No")
  else:
    print("Yes")

### FIXED CODE ###

import collections as coll
 
s = list(input().rstrip())
c = coll.Counter(s)
 
if len(c.keys()) != 2:
  print("No")
 
else:
  if c.most_common()[0][1] != 2:
    print("No")
  else:
    print("Yes")
def dfs(r, c):
    global c, color, G
    S = [r]
    color[r] = c
    while (0 < len(S)):
        u = S.pop()
        for u in G[u]:
            v = color[ch]
            if (v == False):
                color[u] = c
                S.append(u)
 
def assignColor():
    global c, color, G, n
    c = 1
    for i in range(n):
        if (color[i] == False):
            dfs(i, c)
            c += 1
 
n, m = list(map(int, input().split()))
 
G = [False for i in range(n)]
for i in range(m):
    s, t = list(map(int, input().split()))
    G[s].append(t)
    G[t].append(s)
 
color = [False for i in range(n)]
 
assignColor()
 
q = int(input())

for i in range(q):
    s, t = list(map(int, input().split()))
    if (color[s] == color[t]):
        print("yes")
    else:
        print("no")

### FIXED CODE ###

def dfs(r, c):
    global color, G
    S = [r]
    color[r] = c
    while (0 < len(S)):
        u = S.pop()
        for u in G[u]:
            v = color[u]
            if (v == None):
                color[u] = c
                S.append(u)
 
def assignColor():
    global color, G, n
    c = 1
    for i in range(n):
        if (color[i] == None):
            dfs(i, c)
            c += 1
 
n, m = list(map(int, input().split()))
 
G = [[] for i in range(n)]
for i in range(m):
    s, t = list(map(int, input().split()))
    G[s].append(t)
    G[t].append(s)
 
color = [None for i in range(n)]
 
assignColor()
 
q = int(input())

for i in range(q):
    s, t = list(map(int, input().split()))
    if (color[s] == color[t]):
        print("yes")
    else:
        print("no")
a = list[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(a[K])

### FIXED CODE ###

a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(a[K-1])
n = int(input())
s = input()

ans = float('inf')
w_left = [0]
e_right = [0]*n

for i in range(1,n):
  if s[i-1] == 'W':
    w_left.append(w_left[i-1]+1)
  else :
    w_left.append(w_left[i-1])
      
for i in range(1,n):
  if s[n-i] == 'E':
    e_right[n-i-1] = e_right[n-i]+1
  else :
    e_right[n-i-1] = e_right[n-i]

for i in range(n):
    ans = min(ans , w_left[i]+e_right[i])
print(ans)


### FIXED CODE ###

a,b = map(int,input().split())
print(max(a+b,a-b,a*b))
l,r = map(int,input().split())
ans = 2019

if l == 0:print(0);quit()

for i in range(l,r):
    for j in range(l+1,r+1):
        if ans == 0:
            break
        ans = min(ans,i*j%2019)

print(ans)

### FIXED CODE ###

n,a,b = map(int,input().split())
print(min(a*n,b))
M, D=map(int,input().split())
if D>=M:
  print(M)
elif:
  print(M-1)

### FIXED CODE ###

M, D=map(int,input().split())
if D>=M:
  print(M)
else:
  print(M-1)
print(3*input()**2)

### FIXED CODE ###

print(3*(int(input())**2))
from itertools import*
from numpy import*
n,k=map(int,input().split())
k2=k+1
s=input()
if len(s)==1:
    if s=="1":
        print(1)
    else:
        print(0)
    exit()
p=[len(list(v))for k,v in groupby(s)if k=="0"]
q=[len(list(v))for k,v in groupby(s)if k=="1"]
if len(p)==1 and len(q)==0 and k>0:
    print(sum(p))
    exit()
elif len(q)==1 and len(p)==0:
    print(sum(q))
    exit()
if s[0]=="1" and s[-1]=="0":
    x=[0]+p
    y=[0]+q+[0]
elif s[0]=="0" and s[-1]=="1":
    x=[0]+p+[0]
    y=[0]+q
else:
    x=[0]+p+[0]
    y=[0]+q+[0]
x1=array(x[:-k])
x2=array(x[k:])
x3=sum(x[:k])
t=x3+cumsum(x2-x1)
y1=array(y[:-k2])
y2=array(y[k2:])
y3=sum(y[:k2])
f=y3+cumsum(y2-y1)
#print(x,y)
#print(t,f)
print(max(max(t+f),x3+y3))

### FIXED CODE ###

from itertools import*
from numpy import*
n,k=map(int,input().split())
k=2*k+1
s=input()
x=[0]*(s[0]=="0")+[len(list(v))for k,v in groupby(s)]+[0]*(s[-1]=="0")
#print(x)
x1=array(x[k:])
x2=array(x[:-k])
x3=sum(x[:k])
y=[x3]+list(x3+cumsum(x1-x2))
print(max(y[::2]))
# https://atcoder.jp/contests/abc102/submissions/7991084
def abc102_c():
    N = int(readline())
    A = np.array(read().split(), dtype=np.int64)

    # b=0として変形する
    B = A - np.arange(1, N+1)
    # 中央値が0になるよう高さ調整する
    B.sort()
    x = B[N//2]
    # 絶対値の合計をとる
    ans = np.abs(B - x).sum()
    print(ans)

abc102_c()

### FIXED CODE ###

# https://atcoder.jp/contests/abc102/submissions/7991084

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

def abc102_c():
    N = int(readline())
    A = np.array(read().split(), dtype=np.int64)

    # b=0として変形する
    B = A - np.arange(1, N+1)
    # 中央値が0になるよう高さ調整する
    B.sort()
    x = B[N//2]
    # 絶対値の合計をとる
    ans = np.abs(B - x).sum()
    print(ans)

abc102_c()
n = int(input())
nums = list(map(int, input().split()))

bs = nums.copy()
res = []

for i in range(n // 2, 0, -1):
    bs[i] = 0
    for j in range(1, n // i):
        bs[i] += bs[i * j]
    bs[i] %= 2
for i in range(n):
    if bs[i] > 0:
        res.append(i + 1)
m = sum(bs)
print(m)
if m > 0:
    print(' '.join(map(str, res)))



### FIXED CODE ###

n = int(input())
nums = list(map(int, input().split()))

bs = nums.copy()
res = []

for i in range(n // 2, 0, -1):
    val = 0
    for j in range(1, n // i + 1):
        if i * j <= n:
            val += bs[i * j - 1]
    bs[i - 1] = val % 2
for i in range(n):
    if bs[i] > 0:
        res.append(i + 1)
m = sum(bs)
print(m)
if m > 0:
    print(' '.join(map(str, res)))
n = int(input())
import math
ans = 0
n = int(input())
for i in range(1,n+1):
    for j in range(1,n+1):
        t = math.gcd(i,j)
        for k in range(1,n+1):
            ans += math.gcd(t,k)
print(ans)

### FIXED CODE ###

k = int(input())
li=[1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692]
print(li[k-1])