#include<iostream>
#include <iomanip>
#include <cstdio>
#include<string>
#include<vector>
#include<array>
#include<math.h>
#include <ctype.h>
#include<algorithm>
#include <set>
using namespace std;
int main()
{
int n,i,j, a,b;
double temp,max = 0;
cin >> n;
for (i = 0; i < n; i++)
{
cin >> a >> b;
temp = sqrt(1.0*a*a + 1.0*b*b);
if (max < temp)
max = temp;
}
printf("%.2f", max);
return 0;
}