#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int a[N], n;
long long l[N], r[N];
pair<long long, int> tr[N];
void add(int x, pair<long long, int> v) {
  for (int i = x; i <= 2 * n; i += (i & -i))
    tr[i].first += v.first, tr[i].second += v.second;
}
pair<long long, int> sum(int x) {
  pair<long long, int> res = {0, 0};
  for (int i = x; i >= 1; i -= (i & -i))
    res.first += tr[i].first, res.second += tr[i].second;
  return res;
}
int main() {
  scanf("%d ", &n);
  for (int i = 1; i <= n; i++) scanf("%d ", a + i);
  for (int i = 1; i <= n; i++) a[i] = a[i] - i;
  for (int i = 1; i <= n; i++) {
    add(a[i] + n, {a[i], 1});
    long long t = sum(2 * n).first - sum(2 * n - i - 1).first,
              temp = sum(2 * n).second - sum(2 * n - i - 1).second;
    l[i] = t - (long long)(n - i) * temp;
  }
  for (int i = 1; i <= 2 * n; i++) tr[i] = {0, 0};
  for (int i = n, j = 1; i >= 1; i--, j++) {
    add(a[i] + n, {a[i], 1});
    long long t = sum(2 * n).first - sum(j - 1).first,
              temp = sum(2 * n).second - sum(j - 1).second;
    r[i] = t + temp * (n - j);
  }
  long long Min = 1e18, temp = -1;
  for (int i = n, k = 0; i >= 1; i--, k++) {
    if (Min > (l[i] + r[i + 1]) * 2) Min = (l[i] + r[i + 1]) * 2, temp = k;
  }
  printf("%lld %lld", Min, temp);
  return 0;
}
