#include <bits/stdc++.h>
using namespace std;
int n, i;
int p[2000011];
long long act, mask, last;
vector<int> wh[2000011];
pair<long long, int> best;
long long abss(long long x) {
  if (x < 0) return -x;
  return x;
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &p[i]), p[i + n] = p[i];
  for (i = 1; i <= n; i++) {
    act += abss(p[i] - i);
    if (i > p[i]) {
      mask--;
      wh[1 + i - p[i]].push_back(i);
    } else {
      mask++;
    }
  }
  best = make_pair(act, 0);
  for (i = 2; i <= n; i++) {
    last = i + n - 1;
    act -= abss(p[i - 1] - 1);
    mask--;
    act += mask;
    if (n > p[last]) {
      mask--;
      wh[i + n - p[last]].push_back(last);
    } else {
      mask++;
    }
    act += abss(p[last] - n);
    for (auto e : wh[i]) mask += 2;
    best = min(best, make_pair(act, (3 * n - i + 1) % n));
  }
  printf("%lld %d", best.first, best.second);
  return 0;
}
