#include <bits/stdc++.h>
using namespace std;
int T[1000000 * 3];
int K[1000000 * 3];
int ad(int k) {
  if (k > 0)
    return k;
  else
    return -k;
}
int main() {
  int n;
  scanf("%d", &n);
  int posi = 0;
  int neg = 0;
  long long sum = 0;
  int d;
  memset(T, 0, sizeof(T));
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d);
    K[i] = d;
    if (d - i > 0) {
      posi++;
      T[d - i]++;
    } else if (d - i <= 0)
      neg++;
    sum = sum + ad(d - i);
  }
  long long mins = sum;
  int kp = 0;
  for (int k = 1; k < n; k++) {
    sum = sum - abs(K[n - k + 1] - n) + abs(K[n - k + 1] - 1);
    neg--;
    neg = max(0, neg);
    sum = sum - posi + neg;
    T[K[n - k + 1] - (n - k + 1)]--;
    if (K[n - k + 1] != 1) {
      T[K[n - k + 1] - 1 + k]++;
      posi++;
    } else
      neg++;
    posi = posi - T[k];
    neg = neg + T[k];
    if (mins > sum) {
      kp = k;
      mins = sum;
    }
  }
  cout << mins << ' ' << kp << endl;
  return 0;
}
