#include <bits/stdc++.h>
const int maxn = 2e6 + 10;
int a[maxn];
int cj[maxn];
int kj[maxn];
long long ans[maxn];
long long Abs(int a) {
  long long s = (long long)a;
  return s > 0 ? s : -s;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] - i >= 0) cj[a[i] - i]++;
  }
  int s = 0;
  long long mi = 1e18;
  for (int i = 1; i <= n; i++) {
    ans[0] += Abs(a[i] - i);
    kj[0] += cj[i - 1];
  }
  for (int i = 1; i <= n - 1; i++) {
    kj[i] += kj[i - 1] - cj[i - 1];
    cj[a[n - i + 1] - 1 + i]++;
    kj[i + 1]++;
  }
  for (int i = 1; i <= n - 1; i++) {
    ans[i] = ans[i - 1] - Abs(a[n - i + 1] - n) + Abs(a[n - i + 1] - 1);
    ans[i] -= (long long)kj[i];
    ans[i] += (long long)n - (long long)1 - (long long)kj[i];
  }
  for (int i = 0; i <= n - 1; i++)
    if (ans[i] < mi) {
      mi = ans[i];
      s = i;
    }
  printf("%lld %d", mi, s);
}
