import numpy as np N = int(input()) A = list(map(int, input().split())) F = np.fft.fft(A) # 振幅スペクトルを計算 amplitude = np.abs(F) F_amplitude = amplitude / N * 2 F_amplitude[0] = F_amplitude[0] / 2 v = 0 ans = 0 for i in range(len(F_amplitude)): if v