#include <bits/stdc++.h>
using namespace std;
long long A[1000010], B[1000010], C[1000010], final[1000010], n;
void addap(int left, int right, int dif, int start) {
  if (left > right) return;
  C[left] += dif;
  B[left] += start;
  C[right] -= dif;
  B[right + 1] -= start + 1LL * dif * (right - left);
}
void prefix() {
  long long cur = 0;
  for (int i = 0; i < n; i++) {
    B[i] += cur;
    cur += C[i];
  }
  long long sm = 0;
  for (int i = 0; i < n; i++) {
    sm += B[i];
    final[i] += sm;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> A[i];
  for (int i = 1; i <= n; i++) {
    if (A[i] > i) {
      addap(0, A[i] - i, -1, A[i] - i);
      addap(A[i] - i + 1, n - i, 1, 1);
      addap(n - i + 1, n - 1, -1, A[i] - 1);
    } else {
      addap(0, n - i, 1, i - A[i]);
      addap(n - i + 1, n - i + A[i], -1, A[i] - 1);
      addap(n - i + A[i] + 1, n - 1, 1, 1);
    }
  }
  prefix();
  long long mini = 1000000000, ind = -1;
  for (int i = 0; i < n; i++) {
    if (final[i] < mini || ind == -1) {
      mini = final[i];
      ind = i;
    }
  }
  cout << mini << " " << ind << '\n';
}
