#include <bits/stdc++.h>
using namespace std;
long long gcd(long long n1, long long n2) {
  if (n2 == 0) return n1;
  if (n1 % n2 == 0) return n2;
  return gcd(n2, n1 % n2);
}
long long powmod(long long base, long long exponent) {
  if (exponent < 0) exponent += 1000000007LL - 1;
  long long ans = 1;
  while (exponent) {
    if (exponent & 1) ans = (ans * base) % 1000000007LL;
    base = (base * base) % 1000000007LL;
    exponent /= 2;
  }
  return ans;
}
long long arr[1000005], pichle = 0, flip[1000005], drastic[1000005];
set<pair<long long, long long> > s;
int main() {
  long long n;
  cin >> n;
  long long now = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    if (i <= arr[i]) {
      pichle--;
      flip[arr[i] - i]++;
      drastic[n - i] = -(n - arr[i]) + (arr[i] - 1) + 1;
      flip[(n - i)]--;
    } else {
      pichle++;
      flip[n - i + arr[i]]++;
      drastic[n - i] = -(n - arr[i]) + (arr[i] - 1) + 1;
      flip[(n - i)]--;
    }
    now += abs(i - arr[i]);
  }
  s.insert(make_pair(now, 0));
  pichle += 2 * flip[0];
  for (long long k = 1; k < n; k++) {
    now += pichle + drastic[k - 1];
    pichle += 2 * flip[k];
    s.insert(make_pair(now, k));
  }
  cout << s.begin()->first << " " << s.begin()->second << '\n';
}
