#include <bits/stdc++.h>
using namespace std;
const int INF = (int)(1e9 + 1e5);
const long long LINF = (long long)(4e18);
const double EPS = 1e-10;
const int MOD = 1000000007;
const int MAXN = 1000005;
int n;
int p[MAXN];
long long ans, cur;
int num;
int up, down;
int meet[MAXN];
void init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
  }
}
void solve() {
  init();
  for (int i = 1; i <= n; i++) {
    cur += abs(p[i] - i);
    if (p[i] <= i) {
      meet[p[i] - i + n]++;
      down++;
    } else {
      meet[p[i] - i]++;
      up++;
    }
  }
  ans = cur;
  for (int i = 1; i < n; i++) {
    cur -= up;
    cur += down;
    up -= meet[i];
    down += meet[i];
    int pos = n - i + 1;
    down--;
    up++;
    cur -= abs(n + 1 - p[pos]);
    cur += abs(1 - p[pos]);
    if (ans > cur) {
      ans = cur;
      num = i;
    }
  }
  printf("%I64d %d\n", ans, num);
}
int main() {
  srand(333);
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  double st = clock();
  int t = 1;
  for (int test = 1; test <= t; test++) {
    solve();
  }
  return 0;
}
