n = input()

R = [input() for i in range(n)]
  
max = R[1] - R[0]
min = R[0]
  
for i in range(1,n):
    if R[i] - min > max:
        max = R[i] - min
    if R[i] < min:
        min = R[i]
  
print max n = input() n input() input input() for i in range(n) for i in range(n) i range(n) range n for i in range(n) input() input R = [input() for i in range(n)] R [input() for i in range(n)] max = R[1] - R[0] max R[1] - R[0] R[1] R 1 R[0] R 0 min = R[0] min R[0] R 0 for i in range(1,n):
    if R[i] - min > max:
        max = R[i] - min
    if R[i] < min:
        min = R[i]
   i range(1,n) range 1 n if R[i] - min > max:
        max = R[i] - min
     R[i] - min > max R[i] - min R[i] R i min max max = R[i] - min max R[i] - min R[i] R i min if R[i] < min:
        min = R[i]
   R[i] < min R[i] R i min min = R[i] min R[i] R i print min = R[i] R[i] min min = R[0] R[0] min n = input() input() n R = [input() for i in range(n)] [input() for i in range(n)] R max = R[1] - R[0] R[1] - R[0] max max = R[i] - min R[i] - min max
n = input()

R = [input() for i in range(n)]
  
max = R[1] - R[0]
min = R[0]
  
for i in range(1,n):
    if R[i] - min > max:
        max = R[i] - min
    if R[i] < min:
        min = R[i]
  
print max