#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char a = getchar();
  while (a < '0' || a > '9') {
    if (a == '-') f = -1;
    a = getchar();
  }
  while (a >= '0' && a <= '9') x = x * 10 + a - '0', a = getchar();
  return x * f;
}
int n, p[1000000 + 5], neg, delta, num;
long long ans, now;
priority_queue<int> q;
int main() {
  n = read();
  for (int i = 1; i <= n; i++) p[i] = read(), ans += abs(p[i] - i);
  now = ans;
  num = n;
  for (int i = 1; i <= n; i++)
    if (p[i] - i <= 0)
      neg++;
    else
      q.push(i - p[i]);
  for (int i = n - 1; i; i--) {
    int tmp = neg - q.size();
    if (p[i + 1] - n <= 0)
      tmp--;
    else
      tmp++;
    now = now - abs(p[i + 1] - n) + abs(p[i + 1] - 1) + tmp;
    if (ans > now) ans = now, num = i;
    delta++;
    while (!q.empty()) {
      int x = -q.top();
      if (x - delta > 0) break;
      neg++;
      q.pop();
    }
    if (p[i + 1] - n <= 0 && p[i + 1] - 1 > 0)
      neg--, q.push(-p[i + 1] + 1 - delta);
  }
  printf("%I64d %d\n", ans, n - num);
  return 0;
}
