n = input()
R = [input() for i in xrange(n)]
m = R[0]
ans = -1e10
for r in R[1:]:
    ans = max(ans, r - m)
    m = min(m, r)
print ans n = input() n input() input input() for i in xrange(n) for i in xrange(n) i xrange(n) xrange n for i in xrange(n) input() input R = [input() for i in xrange(n)] R [input() for i in xrange(n)] m = R[0] m R[0] R 0 ans = -1e10 ans -1e10 for r in R[1:]:
    ans = max(ans, r - m)
    m = min(m, r) r R[1:] R 1: 1 ans = max(ans, r - m) ans max(ans, r - m) max ans r - m r m m = min(m, r) m min(m, r) min m r print m = R[0] R[0] m ans = max(ans, r - m) max(ans, r - m) ans n = input() input() n R = [input() for i in xrange(n)] [input() for i in xrange(n)] R ans = -1e10 -1e10 ans m = min(m, r) min(m, r) m
n = input()
R = [input() for i in xrange(n)]
m = R[0]
ans = -1e10
for r in R[1:]:
    ans = max(ans, r - m)
    m = min(m, r)
print ans