#include <bits/stdc++.h>
using namespace std;
long long n, ans, now, id, numz, numf;
long long a[1000010], s[1000010];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    ++s[(a[i] - i + n) % n];
    if (a[i] - i > 0)
      ++numz;
    else
      ++numf;
    now += abs(a[i] - i);
  }
  s[n] = s[0];
  ans = now;
  for (int i = 1; i <= n; ++i) {
    --numf;
    now -= numz;
    now += numf;
    now += a[n - i + 1] - 1;
    now -= n - a[n - i + 1];
    numf += s[i];
    numz -= s[i];
    ++numz;
    if (ans > now) {
      ans = now;
      id = i;
    }
  }
  cout << ans << " " << id << endl;
  return 0;
}
