#include <bits/stdc++.h>
using namespace std;
int n, m, a[1000010];
int b[1000010], c[1000010];
long long ans[1000010], res[1000010], Min;
int main() {
  scanf("%d", &n);
  int i, j = 0, k = 0;
  for (i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    ans[0] += abs(a[i] - i);
    if (a[i] <= i) {
      ++j;
      res[n - i + 1] += a[i] - (n - a[i]);
      ++b[n - i + 1];
      ++c[a[i] + 1 + n - i];
    } else {
      ++k;
      res[n - i + 1] += a[i] - (n - a[i]);
      ++b[n - i + 1];
      ++c[a[i] + 1 - i];
    }
  }
  Min = ans[0];
  m = 0;
  for (i = 1; i < n; ++i) {
    j += c[i] - b[i];
    k += b[i] - c[i];
    ans[i] = ans[i - 1] + j - k + res[i];
    if (ans[i] < Min) Min = ans[i], m = i;
  }
  printf("%I64d %d\n", Min, m);
  return 0;
}
