#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n, a[N], c[N << 1], pcnt, ncnt;
long long psum, nsum;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] - i > 0)
      c[a[i] - i]++, pcnt++, psum += a[i] - i;
    else
      ncnt++, nsum += i - a[i];
  }
  long long ans = psum + nsum, ansk = 0;
  for (int i = 1; i < n; i++) {
    psum -= pcnt;
    nsum += ncnt;
    pcnt -= c[i];
    ncnt += c[i];
    long long x = a[n - i + 1];
    nsum -= n + 1 - x;
    ncnt--;
    if (x > 1)
      pcnt++, psum += x - 1, c[x - 1 + i]++;
    else
      ncnt++;
    if (ans > psum + nsum) ans = psum + nsum, ansk = i;
  }
  cout << ans << ' ' << ansk << '\n';
  return 0;
}
