#include <bits/stdc++.h>
using namespace std;
int const N = 1000100;
int a[N], s[N * 2];
void bru(int n) {
  int ret = 0x3f3f3f3f;
  for (int i = 1; i <= (n); ++i) {
    int now = 0;
    for (int j = 0; j < (n); ++j) {
      int t = i + j;
      if (t > n) t -= n;
      now += max(j + 1 - a[t], a[t] - j - 1);
    }
    ret = min(ret, now);
  }
  cout << ret << endl;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= (n); ++i) scanf("%d", &a[i]);
  long long up = 0, down = 0;
  long long now = 0, ret = 0, rc = 0;
  for (int i = 1; i <= (n); ++i) {
    if (a[i] >= i)
      ++up;
    else {
      ++down;
      s[i - a[i]]++;
    }
    now += max(a[i] - i, i - a[i]);
  }
  ret = now;
  int step = 0;
  for (int i = 1; i <= n - 1; ++i) {
    ++step;
    --up;
    now -= a[i] - 1;
    now += n - a[i];
    now += up;
    now -= down;
    s[step + n - a[i]]++;
    up += s[step];
    down -= s[step];
    ++down;
    if (now < ret) {
      ret = now;
      rc = n - i;
    }
  }
  cout << ret << " " << rc << endl;
  return 0;
}
