#include <bits/stdc++.h>
using namespace std;
const int N = 1000000 + 10;
int A[N], B[N], C[N];
int main() {
  int n, cnt = 0, sign;
  long long ans = 0;
  memset(C, 0, sizeof(C));
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    B[i] = A[i] - i;
    if (B[i] <= 0)
      cnt++;
    else if (B[i] > 0)
      C[B[i]]++;
    if (A[i] == 1) sign = n - i + 1;
    ans += (long long)abs(B[i]);
  }
  long long mini = ans;
  int u = 0;
  for (int i = 1; i <= n - 1; i++) {
    ans = ans + cnt - (n - cnt) - 1 + A[n - i + 1] - 1 - n + A[n - i + 1];
    cnt = cnt + C[i];
    if (i != sign) {
      cnt--;
      C[i + A[n - i + 1] - 1]++;
    }
    if (mini > ans) {
      mini = ans;
      u = i;
    }
  }
  printf("%I64d %d\n", mini, u);
}
