using System;
using System. Collections. Generic;
using System. Linq;
using System. Text;
using System. Threading. Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int a= Int32. Parse(Console. ReadLine());
int b = Int32. Parse(Console. ReadLine());
int c = Int32. Parse(Console. ReadLine());
int d = Int32. Parse(Console. ReadLine());
int e = Int32. Parse(Console. ReadLine());
int f = Int32. Parse(Console. ReadLine());
int g = Int32. Parse(Console. ReadLine());
int h = Int32. Parse(Console. ReadLine());
b = Math. Max(a, b);
c = Math. Max(b, c);
d = Math. Max(c, d);
e = Math. Max(d, e);
f = Math. Max(e, f);
g = Math. Max(f, g);
h = Math. Max(g, h);
Console. WriteLine(h);
}
}
}