#include<stdio.h>
int cmp(int x,int y){
int z;
if(x>y)
z=x;
else
return z;
}
int main(){
int a[2][3];
int row, colum,n;
for(row = 0;row < 2;row++)
for (colum = 0; colum < 3; colum++)
scanf("%d",&a[row][colum]);
int max = a[0][0];
for(row=0;row<2;row++){
for (colum = 0; colum < 3; colum++){
max = cmp(a[row][colum],max);
}
}
printf("%d", max);
return 0;
}