#include <bits/stdc++.h>
using namespace std;
deque<long long> a;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  a.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  multiset<long long> P;
  long long NZ = 0;
  long long sp = 0, sn = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] - i >= 0) {
      P.insert(a[i] - i);
      sp += a[i] - i;
    } else {
      NZ++;
      sn += a[i] - i;
    }
  }
  long long mi = sp - sn;
  long long ans = 0;
  for (long long i = 1; i < n; i++) {
    if (a.back() - n + 1 >= 0) {
      P.erase(P.find(a.back() - n + i));
      sp -= a.back() - n + 1;
    } else {
      NZ--;
      sn -= a.back() - n + 1;
    }
    while (P.size()) {
      if (*P.begin() - i < 0) {
        NZ++;
        P.erase(P.begin());
      } else
        break;
    }
    sp -= P.size();
    sn -= NZ;
    P.insert(a.back() + i);
    sp += a.back();
    if (sp - sn < mi) {
      mi = sp - sn;
      ans = i;
    }
    a.push_front(a.back());
    a.pop_back();
  }
  cout << mi << ' ' << ans << '\n';
  return 0;
}
