# include<stdio.h>
# define N 3
int main()
{
int a[N][N],sum=0,t=0;
double ave;
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
scanf_s("%d",&a[i][j]);
}
}
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
if ((i == 0 || i == N - 1) && (j == 0 || j == N - 1))
{
sum = sum + a[i][j];
t++;
}
}
}
ave = (double)sum / t;
printf("%lf",ave);
return 0;
}