#include <bits/stdc++.h>
using namespace std;
const long long int INF = 0x3f3f3f3f3f3f3f3f;
const int MAXN = 2000005;
long long int n;
long long int p[MAXN];
long long int t[MAXN];
long long int x[MAXN];
int d, k;
long long int sum_minus;
long long int sum_adds;
void In() {
  scanf("%I64d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &p[i]);
}
void Work() {
  for (int i = 1; i <= n; i++) {
    if (i < p[i])
      sum_minus++;
    else
      sum_adds++;
  }
  for (int i = 1; i <= n; i++) {
    t[n - i + 1]--;
    if (i < p[i])
      t[p[i] - i]++;
    else
      t[n + p[i] - i]++;
  }
  for (int i = 1; i < n; i++) {
    x[i] = 2 * p[n - i + 1] - n - 2;
  }
  long long int increase = 0;
  long long int sum = 0;
  long long int ans = 0;
  for (int i = 1; i <= n; i++) ans += abs(i - p[i]);
  sum = ans;
  for (int i = 1; i < n; i++) {
    increase = sum_adds - sum_minus + x[i];
    sum += increase;
    if (sum < ans) {
      ans = sum;
      k = i;
    }
    sum_minus -= t[i];
    sum_adds += t[i];
  }
  cout << ans << " " << k << endl;
}
int main() {
  In();
  Work();
  return 0;
}
