output_description: Print the minimum total fare.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A
      B
      C
      D
attempt: a,b,c,d=[int(input()) for_ in range(4)]
  print(min(a,b)+min(c,d))
  
problem_description: Statement
  
  You planned a trip using trains and buses. The train fare will be A yen (the
  currency of Japan) if you buy ordinary tickets along the way, and B yen if you
  buy an unlimited ticket. Similarly, the bus fare will be C yen if you buy
  ordinary tickets along the way, and D yen if you buy an unlimited ticket.
  
  Find the minimum total fare when the optimal choices are made for trains and
  buses.
samples: [{"input": "600\n    300\n    220\n    420", "output": "520\n    \n\nThe train fare will be 600 yen if you buy ordinary tickets, and 300 yen if you\nbuy an unlimited ticket. Thus, the optimal choice for trains is to buy an\nunlimited ticket for 300 yen. On the other hand, the optimal choice for buses\nis to buy ordinary tickets for 220 yen.\n\nTherefore, the minimum total fare is 300 + 220 = 520 yen.\n\n* * *"}, {"input": "555\n    555\n    400\n    200", "output": "755\n    \n\n* * *"}, {"input": "549\n    817\n    715\n    603", "output": "1152"}]