#include <bits/stdc++.h>
using namespace std;
const int N = 2000010;
int n, k;
long long ans, cntz, cntf, sumz, sumf;
long long p[N], tmp[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &p[i]);
    if (p[i] - i <= 0) {
      cntf++;
      sumf += i - p[i];
    } else {
      cntz++;
      tmp[p[i] - i]++;
      sumz += p[i] - i;
    }
  }
  ans = sumz + sumf;
  for (int i = 1; i < n; i++) {
    sumz -= cntz;
    cntz -= tmp[i];
    sumf += cntf;
    cntf += tmp[i];
    int x = p[n - i + 1];
    cntf--;
    sumf -= n - x + 1;
    if (x - 1 > 0) {
      tmp[x + i - 1]++;
      sumz += x - 1;
      cntz++;
    } else
      cntf++;
    if (ans > sumz + sumf) {
      ans = sumz + sumf;
      k = i;
    }
  }
  printf("%lld %d\n", ans, k);
  return 0;
}
