#include <bits/stdc++.h>
using namespace std;
int n, tot, cnt[1001000], a[1001000], anw;
long long ans = 0, an = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] >= i) {
      tot++;
    } else {
      cnt[i - a[i]]++;
    }
    an += abs(i - a[i]);
  }
  ans = an;
  anw = 0;
  for (int i = 1; i < n; i++) {
    tot--;
    an = an + tot - (n - 1 - tot) - abs(a[i] - 1) + abs(a[i] - n);
    if (n + i - a[i] < n) cnt[n + i - a[i]]++;
    tot += cnt[i];
    if (an < ans) {
      ans = an;
      anw = i;
    }
  }
  anw = (n - anw) % n;
  printf("%I64d %d", ans, anw);
}
