#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> p(n);
  for (long long i = 0; i < n; i++) cin >> p[i];
  vector<long long> dif(n);
  long long sum = 0, pls = 0, mns = 0;
  for (long long i = 0; i < n; i++)
    dif[i] = p[i] - (i + 1), sum += abs(dif[i]), (dif[i] > 0 ? mns : pls)++;
  vector<long long> difs(n);
  difs[0] = sum;
  vector<long long> zeros(n);
  for (long long i = 0; i < n; i++) {
    long long d = (n + p[i] - i - 1) % n;
    zeros[d]++;
  }
  for (long long i = 1; i < n; i++) {
    sum += pls - mns;
    long long r = n - i;
    sum = sum - (n + 1 - p[r]) + (p[r] - 1);
    difs[i] = sum;
    pls--;
    mns++;
    pls += zeros[i];
    mns -= zeros[i];
  }
  long long mn = 1e18, mnidx;
  for (long long i = 0; i < n; i++)
    if (difs[i] < mn) mn = difs[i], mnidx = i;
  cout << mn << " " << mnidx << endl;
}
