#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), id(n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    a[i]--;
    id[a[i]] = i;
  }
  vector<long long> s1(2 * n + 2), s2(2 * n + 2);
  for (int i = 0; i < n; ++i) {
    int c = a[i];
    s1[n + 1 - i] -= 1;
    s1[n - i + c + 2] += 2;
    s1[2 * n + 1 - i] -= 1;
    s2[n + 1 - i] += c + 1;
    s2[2 * n + 1 - i] -= n - c - 1;
  }
  for (int i = 0; i < 2 * n; ++i) s1[i + 1] += s1[i];
  for (int i = 0; i < 2 * n + 2; ++i) s2[i] += s1[i];
  for (int i = 0; i < 2 * n; ++i) s2[i + 1] += s2[i];
  for (int i = 0; i < n; ++i) s2[i + 1] += s2[n + i + 1];
  int ans;
  long long mi = 1e18;
  for (int i = 0; i < n; ++i) {
    if (s2[i + 1] < mi) {
      mi = s2[i + 1];
      ans = i;
    }
  }
  cout << mi << " " << ans << endl;
  return 0;
}
