#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int n, a[N], vis[N];
int main() {
  scanf("%d", &n);
  int64_t ans = 0;
  int f = 0, g = 1, pos = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    ans += abs(a[i] - i);
    if (a[i] == 1) continue;
    if (a[i] > i)
      ++f, ++vis[a[i] - i];
    else
      ++g, ++vis[a[i] - i + n];
  }
  int64_t ret = ans;
  for (int k = 1; k < n; ++k) {
    ret -= abs(n + 1 - a[n - k + 1]);
    ret += abs(1 - a[n - k + 1]);
    ret += -f + g;
    if (a[n - k + 1] != 1) ++f, --g;
    f -= vis[k];
    g += vis[k];
    if (ret < ans) ans = ret, pos = k;
  }
  printf("%lld %d\n", ans, pos);
}
