#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
double b[n];
for(int i = 0;i < n;i++)
{
int a[6];
for(int j = 0;j < 6;j++)
{
cin >> a[j];
}
sort(a,a + 6);
double s = 0;
for(int j = 1;j < 5;j++)
{
s += a[j];
}
s /= 4;
b[i] = s;
}
sort(b,b + n);
printf("%.2lf",b[n - 1]);
return 0;
}