#include <bits/stdc++.h>
const long long N = 1e6 + 100;
long long n;
long long p[N];
void init() {
  std::cin >> n;
  for (long long i = 1; i <= n; i++) {
    int t;
    scanf("%d", &t);
    p[i] = t;
  }
}
long long tag(long long x) { return x > 0 ? 1 : 0; }
void work() {
  static long long cnt[2][N << 1];
  long long sum[2] = {0, 0};
  long long size[2] = {0, 0};
  std::pair<long long, long long> answer;
  std::memset(cnt, 0, sizeof(cnt));
  for (long long i = 1; i <= n; i++) {
    cnt[tag(p[i] - i)][std::abs(p[i] - i)]++;
    size[tag(p[i] - i)]++;
    sum[tag(p[i] - i)] += std::abs(p[i] - i);
  }
  answer = {sum[0] + sum[1], 0};
  for (long long i = 1; i < n; i++) {
    sum[0] += size[0];
    sum[1] -= size[1];
    size[0] += cnt[1][i];
    size[1] -= cnt[1][i];
    long long oldValue = p[n - i + 1] - (n + 1);
    long long newValue = p[n - i + 1] - 1;
    sum[tag(oldValue)] -= std::abs(oldValue);
    sum[tag(newValue)] += std::abs(newValue);
    size[tag(oldValue)]--;
    size[tag(newValue)]++;
    cnt[tag(p[n - i + 1] - (n - i + 1))]
       [std::abs(p[n - i + 1] - (n - i + 1))]--;
    cnt[tag(p[n - i + 1] - (n - i + 1) + n)]
       [std::abs(p[n - i + 1] - (n - i + 1) + n)]++;
    answer = std::min(answer, {sum[0] + sum[1], i});
  }
  std::cout << answer.first << " " << answer.second << std::endl;
}
int main() {
  init();
  work();
  return 0;
}
