#include <cstdio>
#include <cmath>
#include <cstdlib>
#define N 2000000 + 7
int p[N], sum[N] = {0};
int main()
{
int n, r = 0, l = 0, k = 0;
long long ans = 0, now = 0;
freopen("MrBB1.in", "r", stdin);
freopen("MrBB1.out", "w", stdout);
scanf("%d", &n);
for(int i = 1; i <= n; i++)
{
scanf("%d", &p[i]);
now += abs(p[i] - i);
if(p[i] >= i)
{
l++;
sum[p[i] - i]++;
}
else
{
r++;
}
}
if(!now)
{
printf("0 0\n");
return 0;
}
ans = now;
for(int i = 1; i < n; i++)
{
l -= sum[i - 1];
r += sum[i - 1];
now = now - l + r - abs(p[n - i + 1] - n - 1) + abs(p[n - i + 1] - 1);
if(now < ans)
{
ans = now;
k = i;
}
sum[p[n - i + 1] + i - 1]++;
l++;
r--;
}
printf("%lld %d\n", ans, k);
return 0;
}