N = int(input()) A = list(map(int, input().split())) M = N//2 B = [i for i in range(N) if A[i] <= M] ans = 0 for i, b in enumerate(B): ans += abs(b-(2*i+1)) if not N % 2: ct = ans for i in range(M-1, -1, -1): b = B[i] ct -= abs(b-(2*i+1)) ct += abs(b-2*i) ans = min(ans, ct) print(M, ans)