#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  bool f = 0;
  char ch = getchar();
  while (ch < '0' || '9' < ch) f |= ch == '-', ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return f ? -x : x;
}
int n, k[1000009], g[1000009], A, B, ans2;
long long now, ans;
int main() {
  n = read();
  for (int i = 0; i <= n - 1; i++) k[i] = read() - 1, g[(k[i] - i + n) % n]++;
  for (int i = 0; i <= n - 1; i++)
    if (k[i] - i >= 0)
      A++, now += k[i] - i;
    else
      B++, now += i - k[i];
  ans = now, ans2 = 0;
  for (int i = 0; i <= n - 1; i++) {
    if (now < ans) ans = now, ans2 = i;
    now -= (n - 1) - k[n - 1 - i];
    B--;
    A -= g[i];
    B += g[i];
    now -= A;
    now += B;
    now += k[n - 1 - i];
    A++;
  }
  printf("%lld %d\n", ans, ans2);
  return 0;
}
