#include <bits/stdc++.h>
using namespace std;
long long int br[1000001];
long long int rt[1000001];
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  long long int p;
  long long int cr = 0;
  long long int val = 0;
  for (int i = 1; i <= n; i++) {
    cin >> p;
    if (p <= i) {
      val += (abs(p - i));
      cr++;
      rt[n - i] -= 2;
      rt[n - i + p] += 2;
      br[n - i] += (2 * p - 1 - n) + 1;
    } else {
      val += (abs(p - i));
      cr--;
      rt[p - i] += 2;
      rt[n - i] -= 2;
      br[n - i] += (2 * p - 1 - n) + 1;
    }
  }
  long long int in = 0;
  long long int res = val;
  for (int i = 0; i < n; i++) {
    cr += rt[i];
    val += br[i];
    val += cr;
    if (val < res) {
      res = val;
      in = i + 1;
    }
  }
  cout << res << " " << in << endl;
  return 0;
}
