#include <bits/stdc++.h>
using namespace std;
const unsigned _mod = 998244353;
unsigned mod;
const long long infi = 0x3f3f3f3f3f3f3f3fll;
const int inf = 0x3f3f3f3f;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long qpow(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1ll) ret = ret * x;
    y >>= 1ll;
    x = x * x;
  }
  return ret;
}
long long ksm(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1ll) ret = ret * x % mod;
    y >>= 1ll;
    x = x * x % mod;
  }
  return ret;
}
long long _gcd(long long x, long long y) { return y ? _gcd(y, x % y) : x; }
long long n, a[1000010], b[1000010], mn, ans, p, sum;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    a[i] = read(), sum += abs(a[i] - i);
    b[(a[i] - i + n) % n]++;
    p += (a[i] < i) * 2 - 1;
  }
  mn = sum;
  for (int i = 0; i <= n - 2; ++i) {
    p += 2 * b[i] - 2, sum += abs(a[n - i] - 1) - abs(a[n - i] - n) + p + 1;
    if (sum < mn) mn = sum, ans = i + 1;
  }
  cout << mn << ' ' << ans << '\n';
  return 0;
}
