#include <bits/stdc++.h>
using namespace std;
inline int read(void) {
  register int x = 0, f = 1, ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int maxn = 1000005;
int t[maxn], p[maxn];
int main(void) {
  int n = read(), x = 0, y = 0, ansk = 0;
  long long now = 0, ans = 1ll << 60;
  for (register int i = 1; i <= n; ++i) {
    p[i] = read();
    now += abs(i - p[i]);
    if (i - p[i] < 0)
      ++t[p[i] - i], ++y;
    else
      ++x, ++t[n - i + p[i]];
  }
  ans = now;
  for (register int k = 1; k <= n - 1; ++k) {
    int i = n - k + 1;
    now += x - y;
    now += abs(1 - p[i]) - abs(n + 1 - p[i]);
    x += t[k] - 1;
    y -= t[k] - 1;
    if (ans > now) {
      ans = now;
      ansk = k;
    }
  }
  printf("%lld %d\n", ans, ansk);
  return 0;
}
