#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long maxn = 2e6 + 10;
long long num[maxn], n, neg, pos, tot;
inline long long hf(long long num) { return num + n - 1; }
inline long long hhf(long long num) { return num - n + 1; }
deque<long long> d, p;
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    p.push_back(x);
    num[hf(x - i - 1)]++;
  }
  for (long long i = 0; i < 2 * n - 1; i++) {
    d.push_back(num[i]);
    if (hhf(i) <= 0)
      neg += num[i];
    else
      pos += num[i];
    tot += num[i] * abs(hhf(i));
  }
  long long ans = tot, ansind = 0, New = tot;
  for (long long i = 1; i <= n - 1; i++) {
    neg -= (p[n - 1] - n <= 0);
    pos -= (p[n - 1] - n > 0);
    New += (neg - pos);
    New -= abs(p[n - 1] - n);
    New += abs(p[n - 1] - 1);
    d[hf(p[n - 1] - n)]--;
    pos -= d[hf(1)];
    neg += d[hf(1)];
    d.pop_front();
    d.push_back(0);
    d[hf(p[n - 1] - 1)]++;
    pos += (p[n - 1] - 1 > 0);
    neg += (p[n - 1] - 1 <= 0);
    p.push_front(p.back());
    p.pop_back();
    if (New < ans) {
      ans = New;
      ansind = i;
    }
  }
  cout << ans << " " << ansind;
}
