#include <bits/stdc++.h>
int n, neg[2000006], arr[2000006], po, ne;
long long mindis, sum;
int shift;
void update(int p, int val) {
  for (; p <= 2000000; p += (p & -p)) neg[p] += val;
}
int negsum(int p) {
  int ret = 0;
  for (; p; p -= (p & -p)) ret += neg[p];
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    --arr[i];
    if (i - arr[i] >= 0) {
      sum += i - arr[i];
      ++po;
    } else {
      sum += arr[i] - i;
      update(arr[i] - i, 1);
      ++ne;
    }
  }
  mindis = sum;
  int pos = n - 1;
  for (int p = 0; p <= n - 2; p++) {
    if (pos - arr[pos] >= 0)
      po--;
    else {
      update(arr[pos] - pos, -1);
      ne--;
    }
    sum += po + 2 * negsum(p) - ne;
    sum += arr[pos] - (n - 1 - arr[pos]);
    update(p + 1 + arr[pos], 1);
    ++ne;
    if (mindis > sum) {
      mindis = sum;
      shift = p + 1;
    }
    --pos;
  }
  printf("%I64d %d\n", mindis, shift);
}
