#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e6 + 10;
int p[MAXN];
long long a[MAXN], b[MAXN];
void add(int l, int r, long long x) {
  b[l] += x;
  b[r + 1] -= x;
}
int main() {
  int n;
  scanf("%d", &n);
  long long step, ans;
  int f = 0;
  step = ans = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    if (p[i] < i || (p[i] == i && i == 1)) {
      step += i - p[i];
      int l1 = n - i, l2 = p[i] - 1;
      add(1, l1, 1);
      add(l1 + 1, l1 + 1, p[i] - 1 - (n - p[i]));
      add(l1 + 2, l1 + l2 + 1, -1);
      add(l1 + l2 + 2, n, 1);
    } else {
      step += p[i] - i;
      int l1 = p[i] - i, l2 = n - p[i];
      add(1, l1, -1);
      add(l1 + 1, l1 + l2, 1);
      add(l1 + l2 + 1, l1 + l2 + 1, p[i] - 1 - (n - p[i]));
      add(l1 + l2 + 2, n, -1);
    }
  }
  ans = step;
  for (int i = 1; i < n; i++) {
    a[i] = a[i - 1] + b[i];
    step += a[i];
    if (step < ans) {
      ans = step;
      f = i;
    }
  }
  cout << ans << " " << f << endl;
  return 0;
}
