#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long p[1000001];
int n;
long long a[1000001], d[1000001], a1[1000001], d1[1000001];
long long ans = 1e18, cz = 0, cs = 0;
long long res;
int main() {
  scanf("%d", &n);
  int to, pp;
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &p[i]);
    to = (p[i] - 1 - i) + n;
    if (to >= n) to -= n;
    pp = n - i - 1;
    a[to]++, d[to]--;
    a1[pp]--;
    d1[pp]++;
    if (p[i] - 1 >= i)
      cs--;
    else
      cs++;
    res += (long long)abs(p[i] - i - 1);
  }
  for (int i = 0; i < n; i++) {
    if (res < ans) ans = res, cz = i;
    cs -= 1;
    cs -= d[i];
    cs += a[i];
    res -= abs(p[n - i - 1] - n);
    res += abs(p[n - i - 1] - 1);
    res += cs;
    cs += 1;
    cs -= d1[i];
    cs += a1[i];
  }
  printf("%I64d %I64d\n", ans, cz);
  return 0;
}
