#include <bits/stdc++.h>
using namespace std;
int n, arr[1000010];
long long add[1000010][2];
inline int rd() {
  int a = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) (a *= 10) += c - '0', c = getchar();
  return a;
}
int main() {
  n = rd();
  for (int i = 1; i <= n; i++) {
    arr[i] = rd();
    if (arr[i] >= i) {
      add[0][0] += arr[i] - i, add[0][1]--;
      add[arr[i] - i + 1][0] += 2, add[arr[i] - i + 1][1] += 2;
      add[n - i + 1][0] += arr[i] * 2 - n - 2, add[n - i + 1][1] -= 2;
    } else {
      add[0][0] += i - arr[i], add[0][1]++;
      add[n - i + 1][0] += arr[i] * 2 - n - 2, add[n - i + 1][1] -= 2;
      add[n - i + arr[i] + 1][0] += 2, add[n - i + arr[i] + 1][1] += 2;
    }
  }
  long long sum = 0, delta = 0, mans = 0x3f3f3f3f3f3f3f3fll;
  int mp = 0;
  for (int i = 0; i < n; i++) {
    sum += delta + add[i][0];
    if (sum < mans) mp = i, mans = sum;
    delta += add[i][1];
  }
  printf("%I64d %d\n", mans, mp);
  return 0;
}
