#include <bits/stdc++.h>
using namespace std;
const int N = (int)4e6;
const long long INF = (long long)1e18;
int n, a[N], c[N];
vector<int> g[N];
int eval(int pos, int jump) { return a[pos] - jump; }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    a[i]--;
    a[i + n] = a[i];
  }
  int cpos = 0;
  int cneg = 0;
  long long pos = 0;
  long long neg = 0;
  for (int i = 0; i < n; i++) {
    c[i] = a[i] - i;
    if (c[i] >= 0) {
      cpos++;
      pos += c[i];
    } else {
      cneg++;
      neg += -c[i];
    }
  }
  for (int i = n; i < n + n; i++) {
    c[i] = a[i] - (n - 1);
  }
  for (int i = 0; i < n + n; i++) {
    if (c[i] < 0) {
      int at = i - c[i];
      int st = max(0, i - (n - 1));
      int d = at - i;
      g[st + d].push_back(i);
    }
  }
  int where = -1;
  long long res = INF;
  for (int i = 0; i < n; i++) {
    if (pos + neg < res) {
      res = pos + neg;
      where = (n - i) % n;
    }
    res = min(res, pos + neg);
    cpos--;
    pos -= eval(i, 0);
    neg -= cneg;
    pos += cpos;
    for (int j = 0; j < g[i + 1].size(); j++) {
      int at = g[i + 1][j];
      cneg--;
      cpos++;
    }
    if (eval(i + n, n - 1) >= 0) {
      cpos++;
      pos += eval(i + n, n - 1);
    } else {
      cneg++;
      neg += -eval(i + n, n - 1);
    }
  }
  printf("%lld %d\n", res, where);
  return 0;
}
