#include <bits/stdc++.h>
void solve() {
  int n;
  std::cin >> n;
  int64_t cursum = 0, pos = 0;
  std::vector<int> v(n + n);
  int nonneg = 0;
  int left = 0;
  std::multiset<int> neg;
  for (int i = 0; i < n; ++i) {
    std::cin >> v[i];
    v[i + n] = v[i];
    cursum += abs(v[i] - (i + 1));
    if (v[i] - (i + 1) >= 0) {
      ++nonneg;
    } else {
      neg.insert(-(v[i] - (i + 1)));
    }
  }
  int64_t smallest = cursum;
  for (int i = 1; i < n; ++i) {
    cursum -= v[i - 1] - 1;
    --nonneg;
    cursum += nonneg - int(neg.size());
    ++left;
    if (!neg.empty()) {
      if (*neg.begin() == left) {
        nonneg += neg.count(left);
        neg.erase(left);
      }
    }
    if (v[i + n - 1] - n < 0) {
      neg.insert(-(v[i + n - 1] - n) + left);
    } else {
      ++nonneg;
    }
    cursum += abs(v[i + n - 1] - n);
    if (cursum < smallest) {
      smallest = cursum;
      pos = i;
    }
  }
  std::cout << smallest << " " << (n - pos) % n;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  solve();
  return 0;
}
