#include <bits/stdc++.h>
using namespace std;
int cnt[1000010];
int a[1000010], n;
int main() {
  ios::sync_with_stdio(false);
  int i, j;
  cin >> n;
  int add = 0, sub = 0, b = 0;
  long long tmp = 0, ans;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    tmp += abs(a[i] - i);
    cnt[(a[i] - i + n) % n]++;
    if (a[i] > i)
      sub++;
    else
      add++;
  }
  ans = tmp;
  for (i = 1; i < n; i++) {
    tmp = tmp + add - sub - 1;
    tmp = tmp + (a[n - i + 1] - 1) - (n - a[n - i + 1]);
    sub = sub - cnt[i] + 1;
    add = add + cnt[i] - 1;
    if (ans > tmp) {
      ans = tmp;
      b = i;
    }
  }
  cout << ans << " " << b << endl;
  return 0;
}
