#include <stdio.h>
main()
{
    int t,x; 
    scanf("%d",&x);
     t=-1;
    while (x!=-1)
    {
     
       if(x>t)
       {
        t=x;
       } 
    scanf("%d",&x);
    }
    printf("%d", t); 
}