#include <bits/stdc++.h>
using lint = long long int;
using pii = std::pair<int, int>;
using std::priority_queue;
using std::vector;
int num[1001000];
int N, adding, subing;
lint cur_ans;
priority_queue<pii, vector<pii>, std::greater<pii> > pq;
int main(void) {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    int temp;
    scanf("%d", &temp);
    num[i] = temp;
    cur_ans += abs(temp - i);
    if (temp > i) {
      subing++;
      pq.push(pii(temp - i, i));
    } else {
      adding++;
    }
  }
  int cycling = 0;
  lint ans = cur_ans;
  for (int i = 1; i < N; i++) {
    cur_ans = cur_ans + adding - subing - 1;
    while (!pq.empty() && pq.top().first == i) {
      adding++;
      subing--;
      pq.pop();
    }
    cur_ans -= abs(num[N - i + 1] - N);
    cur_ans += abs(num[N - i + 1] - 1);
    adding--;
    if (num[N - i + 1] > 1) {
      subing++;
      pq.push(pii(num[N - i + 1] - 1 + i, N - i + 1));
    } else {
      adding++;
    }
    if (ans > cur_ans) {
      cycling = i;
      ans = cur_ans;
    }
  }
  printf("%lld %d", ans, cycling);
  return 0;
}
