#include <bits/stdc++.h>
using namespace std;
const int oo = 1e9;
const int N = 1e7;
int n, res, tail, a[N], l, r, L[N];
long long sum, smin;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  l = 0;
  r = 0;
  sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] >= i) {
      l++;
      L[a[i] - i]++;
    } else
      r++;
    sum += abs(a[i] - i);
  }
  smin = sum, res = 0;
  tail = n;
  for (int i = 1; i <= n - 1; i++) {
    l = l - L[i - 1];
    r = r + L[i - 1];
    sum = sum + r - l;
    sum += a[tail] - 1 - abs(a[tail] - n - 1);
    L[a[tail] + i - 1]++;
    tail--;
    l++;
    r--;
    if (sum < smin) {
      smin = sum;
      res = i;
    }
  }
  cout << smin << " " << res;
  return 0;
}
