#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int p[N];
int BIT[N];
long long yo[N];
void rng(int l, int r, int val) {
  if (l > r) return;
  yo[l] += val;
  yo[r + 1] -= val;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (int i = 1; i <= n; i++) {
    if (p[i] >= i) {
      rng(1, p[i] - i, -1);
      rng(p[i] - i + 1, n - i, 1);
      rng(n - i + 1, n - i + 1, 2 * p[i] - n - 1);
      rng(n - i + 2, n - 1, -1);
    } else {
      rng(1, n - i, 1);
      rng(n - i + 1, n - i + 1, 2 * p[i] - n - 1);
      rng(n - i + 2, n - i + p[i], -1);
      rng(n - i + p[i] + 1, n - 1, 1);
    }
  }
  long long tot = 0;
  for (int i = 1; i <= n; i++) tot += abs(p[i] - i);
  long long ans = tot, best_pos = 0;
  long long tmp = 0;
  for (int i = 1; i < n; i++) {
    tmp += yo[i];
    tot += tmp;
    if (ans > tot) ans = tot, best_pos = i;
  }
  cout << ans << " " << best_pos << endl;
}
