#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> x0(n + 1, 0);
  vector<long long> r(n + 1, 0);
  for (int i = 1; i <= n; i++) {
    int pi;
    cin >> pi;
    if (pi <= i) {
      int z = i - pi;
      x0[0] += z;
      r[0] -= 1;
      x0[z] += 0;
      r[z] += 2;
      x0[i] += -(i - z);
      r[i] -= 1;
      x0[i] += n - pi;
      r[i] -= 1;
    } else {
      int z = i + (n - pi);
      x0[0] += pi - i;
      r[0] += 1;
      x0[i] += -pi;
      r[i] -= 1;
      x0[i] += n - pi;
      r[i] -= 1;
      x0[z] += 0, r[z] += 2;
    }
  }
  for (int i = 0; i + 1 < n; i++) {
    long long nxt = x0[i] + r[i];
    x0[i + 1] += nxt;
    r[i + 1] += r[i];
  }
  int cyclic = min_element(begin(x0), begin(x0) + n) - begin(x0);
  cout << x0[cyclic] << ' ' << (n - cyclic) % n << '\n';
  return (0);
}
