#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 10;
int a[M], pre[M];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  long long sum = 0, Min;
  int ans = 0;
  memset(pre, 0, sizeof(pre));
  for (int i = 1; i <= n; i++) {
    sum += abs(a[i] - i);
    if (a[i] - i <= 0)
      pre[0]++;
    else
      pre[a[i] - i]++;
  }
  Min = sum;
  int cnt = pre[0];
  for (int i = 1; i < n; i++) {
    int pos = n - i + 1;
    if (a[pos] - n < 1) cnt--;
    if (a[pos] - pos <= 0)
      pre[0]--;
    else
      pre[a[pos] - pos]--;
    pre[min(a[pos] + i - 1, M - 10)]++;
    sum++;
    sum += cnt;
    sum -= (n - cnt);
    sum -= abs(a[pos] - n);
    sum += abs(a[pos] - 1);
    cnt += pre[i];
    if (sum < Min) {
      ans = i;
      Min = sum;
    }
  }
  printf("%lld %d\n", Min, ans);
  return 0;
}
