#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
long long arr[N];
long long pos[N];
long long chance[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t, i, j;
  long long n;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    pos[arr[i]] = i;
  }
  long long high = 0, low = 0;
  long long ans = 0, ind = 0;
  for (i = 1; i <= n; i++) {
    if (arr[i] == i) {
      high++;
    } else if (arr[i] < i) {
      high++;
      ans += i - arr[i];
      chance[arr[i] - i + n]++;
    } else {
      low++;
      ans += arr[i] - i;
      chance[arr[i] - i]++;
    }
  }
  long long prev_ans = ans;
  for (i = 1; i < n; i++) {
    long long lst_elem = arr[n - (i - 1)];
    long long cur_ans =
        prev_ans + high - 1 - low - abs(n - lst_elem) + abs(1 - lst_elem);
    if (cur_ans < ans) {
      ans = cur_ans;
      ind = i;
    }
    prev_ans = cur_ans;
    high--;
    high += chance[i];
    low -= chance[i];
    low++;
  }
  cout << ans << " " << ind;
}
