#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int n,z,x,c,v;
int a[2000005]={0};
int main()
{
freopen("MrBB1.in","r",stdin);
freopen("MrBB1.out","w",stdout);
int i,j;
cin>>n;
x=1000000;
for (i=1;i<=n;i++)
cin>>a[i];
for (i=n+1;i<=n*2;i++)
a[i]=a[i-n];
c=0;
for (i=0;i<=n-1;i++)
{
z=0;
c=0;
for (j=i+1;j<=i+n;j++)
{
c=c+1;
if ((i+1)<=n)
z=z+abs(a[j]-c);
else
z=z+abs(a[j]-c-n);
}
if (x>z)
{
x=z;
v=i;
}
}
cout<<x<<" "<<v;
fclose(stdin);
fclose(stdout);
}