#include <bits/stdc++.h>
using namespace std;
int a[1000010], b[1000010];
int main() {
  int n, c, d = 0, l = 0;
  long long s = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] > i) {
      c = a[i] - i;
      s += (a[i] - i);
      d--;
    } else {
      c = a[i] + n - i;
      s += (i - a[i]);
      d++;
    }
    b[c]++;
  }
  long long ans = s;
  for (int i = 0; i < n - 1; ++i) {
    int last = a[n - i];
    d += (2 * b[i] - 2);
    s = s + d + last - (n - last);
    if (ans > s) {
      ans = s;
      l = i + 1;
    }
  }
  printf("%lld %d\n", ans, l);
}
