#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int ar[N], kol[N], udal, prib;
int main() {
  int n;
  long long cur = 0, ind = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", ar + i);
    if (ar[i] > i) {
      ++prib;
      ++kol[ar[i] - i];
    } else {
      ++udal;
      ++kol[n - i + ar[i]];
    }
    cur += abs(ar[i] - i);
  }
  long long mn = cur;
  for (int i = 0; i < n - 1; ++i) {
    cur -= abs(ar[n - i] - n);
    cur += ar[n - i] - 1;
    cur -= prib;
    cur += udal - 1;
    ++prib;
    --udal;
    udal += kol[i + 1];
    prib -= kol[i + 1];
    if (cur < mn) {
      mn = cur;
      ind = i + 1;
    }
  }
  cout << mn << " " << ind;
  return 0;
}
