#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000005;
long long num[maxn];
long long inleft[2 * maxn];
long long sum, Left, Right;
long long ans;
int times;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    sum = 0;
    Left = Right = 0;
    memset(inleft, 0, sizeof(inleft));
    for (int i = 1; i <= n; ++i) {
      scanf("%I64d", &num[i]);
      if (num[i] >= i) {
        ++inleft[num[i] - i];
        ++Left;
      } else {
        ++Right;
      }
      sum += abs(num[i] - i);
    }
    ans = sum;
    times = 0;
    for (int i = 1; i < n; ++i) {
      Left -= inleft[i - 1];
      Right += inleft[i - 1];
      sum = sum - Left + Right - abs((n + 1) - num[n - i + 1]) +
            num[n - i + 1] - 1;
      ++inleft[num[n - i + 1] + i - 1];
      if (ans > sum) {
        ans = sum;
        times = i;
      }
      ++Left;
      --Right;
    }
    printf("%I64d %d\n", ans, times);
  }
  return 0;
}
