#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 7;
int cnt[N], a[N], idx, l, r, n;
long long ans, sum;
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) {
    scanf("%d", a + i);
    if (a[i] >= i)
      l++, cnt[a[i] - i]++;
    else
      r++;
    ans += abs(a[i] - i);
  }
  sum = ans, idx = 0;
  for (int i = (0); i <= ((n - 1)); ++i) {
    l -= cnt[i], r += cnt[i];
    sum = sum - l + r - abs(a[n - i] - n) + a[n - i] - 2;
    cnt[a[n - i] + i]++, l++, r--;
    if (sum < ans) ans = sum, idx = i + 1;
  }
  printf("%lld %d\n", ans, idx);
  return 0;
}
