#include <bits/stdc++.h>
long long p[1000007];
long long change[1000007];
long long what[1000007];
int main(int argc, char const *argv[]) {
  long long n;
  std::cin >> n;
  long long sum = 0;
  long long inc = 0;
  for (int i = 0; i <= n; ++i) {
    change[i] = 0;
    what[i] = -2;
  }
  for (int i = 1; i <= n; ++i) {
    std::cin >> p[i];
    sum += std::abs(p[i] - i);
    if (p[i] > i) {
      what[(p[i] - i + n) % n] += 2;
      inc -= 1;
    } else if (p[i] <= i) {
      what[(p[i] - i + n) % n] += 2;
      if (i != n) inc += 1;
    }
    change[n - i + 1] += (std::abs(p[i] - 1) - std::abs(p[i] - n));
  }
  int id = 0;
  long long temp = sum;
  for (int i = 1; i < n; ++i) {
    temp = temp + inc + change[i];
    if (sum > temp) {
      sum = temp;
      id = i;
    }
    inc += what[i];
  }
  std::cout << sum << " " << id << std::endl;
  return 0;
}
