#include <bits/stdc++.h>
using namespace std;
long long dat[1000000 + 10];
long long dev[2000000 + 10];
int main() {
  long long n = 0, sum = 0, k = 0, tmp = 0, right = 0, left = 0, end = 0,
            set = 0, setk = 0;
  cin >> n;
  for (long long a = 1; a <= n; a++) {
    cin >> dat[a];
    if (a <= dat[a])
      left++, dev[dat[a] - a]++;
    else
      right++;
    sum += abs(a - dat[a]);
  }
  tmp = sum;
  for (k = 0; k < n - 1; k++) {
    left -= dev[k];
    right += dev[k];
    sum = sum - left + right - abs(dat[n - k] - n - 1) + dat[n - k] - 1;
    dev[dat[n - k] + k]++;
    left++;
    right--;
    if (sum < tmp) {
      tmp = sum;
      setk = k + 1;
    }
  }
  cout << tmp << ' ' << setk;
  return 0;
}
