#include <bits/stdc++.h>
using namespace std;
const long long N = 2e6;
long long a[N + 10], c[N + 10];
signed main() {
  long long n;
  scanf("%lld", &n);
  long long ftot = 0, fcnt = 0, ztot = 0, zcnt = 0;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] <= i) {
      fcnt++;
      ftot += i - a[i];
    } else {
      zcnt++;
      ztot += a[i] - i;
      c[a[i] - i]++;
    }
  }
  long long ans = ztot + ftot, k = 0;
  for (long long i = 1; i < n; i++) {
    long long x = a[n - i + 1];
    ztot -= zcnt;
    ftot += fcnt;
    zcnt -= c[i];
    fcnt += c[i];
    ftot -= (n + 1 - x);
    fcnt--;
    if (x == 1)
      fcnt++;
    else {
      c[x + (i - 1)]++;
      ztot += (x - 1);
      zcnt++;
    }
    if (ftot + ztot < ans) {
      ans = ftot + ztot;
      k = i;
    }
  }
  printf("%lld %lld", ans, k);
  return 0;
}
