#include<stdio.h>
#include<stdlib.h>
#define LL long long
int p[1000005], cur[2000005];
int main(void)
{
LL ans, sum;
int n, L, r, i, temp;
scanf(“%d”, &n);
sum = L = r = temp = 0;
for(i=1;i<=n;i++)
scanf(“%d”, &p[i]);
for(i=1;i<=n;i++)
{
sum += abs(p[i]-i);
if(p[i]>=i) L++, cur[p[i]-i]++;
else r++;
}
ans = sum;
for(i=0;i<n-1;i++)
{
L -= cur[i]; r += cur[i];
sum = sum-L+r-abs(p[n-i]-n-1)+p[n-i]-1;
cur[p[n-i]+i]++;
L++, r–;
if(sum<ans)
ans = sum, temp = i+1;
}
printf(“%lld %d\n”, ans, temp);
return 0;
}