#include <bits/stdc++.h>
using namespace std;
int N, p[2200200], rate[2200200], ansv;
long long cur, ans = 1e18;
int main() {
  scanf("%d", &N);
  for (int i = (0); i < (N); i++) {
    scanf("%d", &p[i]), p[i]--;
    cur += abs(p[i] - i);
    if (p[i] <= i) {
      rate[0]++;
      rate[N - 1 - i]--;
      rate[N - 1 - i] += p[i] - (N - 1 - p[i]);
      rate[N - i] -= p[i] - (N - 1 - p[i]);
      rate[N - i]--;
      rate[N - i + p[i]] += 2;
    } else {
      rate[0]--;
      rate[p[i] - i] += 2;
      rate[N - 1 - i]--;
      rate[N - 1 - i] += p[i] - (N - 1 - p[i]);
      rate[N - i] -= p[i] - (N - 1 - p[i]);
      rate[N - i]--;
    }
  }
  long long start = cur;
  if (cur < ans) {
    ans = cur;
    ansv = 0;
  }
  for (int o = (0); o < (N); o++) {
    cur += rate[o];
    rate[o + 1] += rate[o];
    if (cur < ans) {
      ans = cur;
      ansv = o + 1;
    }
  }
  assert(cur == start);
  printf("%lld %d\n", ans, ansv);
  return 0;
}
