fork(5) download
  1. n,s = map(int, raw_input().split())
  2. ans = s
  3. for i in range(n):
  4. f,t = map(int, raw_input().split())
  5. ans = max(ans, t+f)
  6. print ans
  7.  
Success #stdin #stdout 0.01s 9024KB
stdin
3 7
2 1
3 8
5 2
stdout
11