#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 10;
long long n, zcnt, zsum, fcnt, fsum, ans, k, x;
long long p[N], tmp[N];
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> p[i];
  for (long long i = 1; i <= n; i++) {
    if (p[i] <= i) {
      fcnt++;
      fsum += (i - p[i]);
    } else {
      zcnt++;
      tmp[p[i] - i]++;
      zsum += (p[i] - i);
    }
  }
  ans = zsum + fsum;
  for (long long i = 1; i < n; i++) {
    fcnt--;
    zsum -= zcnt;
    fsum += fcnt;
    zcnt -= tmp[i];
    fcnt += tmp[i];
    x = p[n - i + 1];
    fsum -= n - x;
    if (x > 1) {
      tmp[x - 1 + i]++;
      zsum += x - 1;
      zcnt++;
    } else
      fcnt++;
    if (ans > zsum + fsum) ans = zsum + fsum, k = i;
  }
  cout << ans << " " << k;
  return 0;
}
