#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(const T& x) {
  return x * x;
}
template <class T>
inline void updMin(T& a, const T& b) {
  if (b < a) a = b;
}
template <class T>
inline void updMax(T& a, const T& b) {
  if (b > a) a = b;
}
const int maxn = 3000000;
int a[maxn];
long long s[maxn];
long long kk[maxn];
long long bb[maxn];
int n, sz;
inline long long getsum(long long l, long long r) {
  return (r * (r + 1) - l * (l - 1)) / 2;
}
inline void push(int v, int l_, int r_) {
  if (kk[v] == 0 && bb[v] == 0) {
    return;
  }
  if (l_ == r_) {
    s[v] += kk[v] * l_ + bb[v];
    kk[v] = 0;
    bb[v] = 0;
    return;
  }
  s[v] += kk[v] * getsum(l_, r_) + bb[v] * (r_ - l_ + 1);
  kk[v * 2] += kk[v];
  kk[v * 2 + 1] += kk[v];
  bb[v * 2] += bb[v];
  bb[v * 2 + 1] += bb[v];
  kk[v] = 0;
  bb[v] = 0;
}
int L, R;
long long K, B;
void add(int v, int l_, int r_) {
  if (l_ > R || r_ < L) {
    return;
  }
  if (L <= l_ && R >= r_) {
    kk[v] += K;
    bb[v] += B;
    return;
  }
  int m = (r_ + l_) / 2;
  if (m >= L) {
    add(v * 2, l_, m);
  }
  if (m + 1 <= R) {
    add(v * 2 + 1, m + 1, r_);
  }
}
long long getk(int x, int y, int xx, int yy) {
  if (xx == x) {
    return 0;
  }
  return (yy - y) / (xx - x);
}
inline long long getb(int x, int y, long long k) { return y - k * x; }
void pushh(int v, int l_, int r_) {
  push(v, l_, r_);
  if (l_ == r_) {
    return;
  }
  pushh(v * 2, l_, (l_ + r_) / 2);
  pushh(v * 2 + 1, (l_ + r_) / 2 + 1, r_);
}
inline void addline(int x, int xx, int y, int yy) {
  if (xx < x) {
    return;
  }
  assert(y >= 0);
  assert(yy >= 0);
  long long curk = getk(x, y, xx, yy);
  long long curb = getb(x, y, curk);
  L = x;
  R = xx;
  K = curk;
  B = curb;
  add(1, 0, sz - 1);
}
long long stupid() {
  long long score = -1;
  int ans = -1;
  for (int d = 0; d < n; d++) {
    long long cur = 0;
    for (int i = 1; i <= n; i++) {
      int ii = i + d;
      if (ii > n) {
        ii -= n;
      }
      cur += abs(a[i] - ii);
    }
    if (score == -1 || cur < score) {
      score = cur;
    }
  }
  return score;
}
int main() {
  scanf("%d", &n);
  sz = 1;
  while (sz < n + 5) {
    sz *= 2;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] >= i) {
      addline(0, a[i] - i, a[i] - i, 0);
      addline(a[i] - i + 1, n - i, 1, n - a[i]);
      addline(n - i + 1, n - 1, a[i] - 1, a[i] - i + 1);
    } else {
      addline(0, n - i, i - a[i], n - a[i]);
      addline(n - i + 1, n - i + a[i], a[i] - 1, 0);
      addline(n - i + a[i] + 1, n - 1, 1, i - a[i] - 1);
    }
  }
  pushh(1, 0, sz - 1);
  int mind = 0;
  for (int i = sz; i < sz + n; i++) {
    if (s[i] < s[mind + sz]) {
      mind = i - sz;
    }
  }
  cout << s[mind + sz] << " " << mind << endl;
  return 0;
}
