#include <bits/stdc++.h>
using namespace std;
int n;
const int N = 2000100;
int pi[N], CG[N];
long long del, now, ans, shift;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &pi[i]);
  for (int i = 1; i <= n; ++i)
    if (pi[i] >= i) {
      CG[pi[i] - i]++;
      now += pi[i] - i;
      del--;
    } else {
      CG[pi[i] + n - i]++;
      now += i - pi[i];
      del++;
    }
  ans = now;
  shift = 0;
  for (int i = 1; i < n; ++i) {
    del += CG[i - 1] * 2;
    del -= 2;
    now += abs(pi[n - i + 1] - 1) - abs(pi[n - i + 1] - n) + 1;
    now += del;
    if (now < ans) {
      ans = now;
      shift = i;
    }
  }
  cout << ans << " " << shift;
}
