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.

-----Constraints-----
 - 1 \leq A \leq 1 000
 - 1 \leq B \leq 1 000
 - 1 \leq C \leq 1 000
 - 1 \leq D \leq 1 000
 - All input values are integers.

-----Input-----
Input is given from Standard Input in the following format:
A
B
C
D

-----Output-----
Print the minimum total fare.

-----Sample Input-----
600
300
220
420

-----Sample Output-----
520

The train fare will be 600 yen if you buy ordinary tickets, and 300 yen if you buy an unlimited ticket.
Thus, the optimal choice for trains is to buy an unlimited ticket for 300 yen.
On the other hand, the optimal choice for buses is to buy ordinary tickets for 220 yen.
Therefore, the minimum total fare is 300 + 220 = 520 yen.
[{"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nsum = (min(a, b) + min(c, d))\nprint(sum)", "passed": true, "time": 0.35, "memory": 14224.0, "status": "done"}, {"code": "A, B, C, D = [int(input()) for i in range(4)]\n\nif A <= B:\n    train = A\nelse:\n    train = B\nif C <= D:\n    bus = C\nelse:\n    bus = D\n\nanswer = (train + bus)\nprint(answer)", "passed": true, "time": 0.15, "memory": 14276.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nprint((min(A,B)+min(C,D)))\n", "passed": true, "time": 0.15, "memory": 14148.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a,b)+min(c,d))", "passed": true, "time": 1.73, "memory": 14272.0, "status": "done"}, {"code": "a = list(int(input()) for i in range(4))\n\nprint(min(a[0],a[1]) + min(a[2],a[3]))", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "# A - Traveling Budget\n\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nif A <= B:\n    if C <= D:\n        answer = A + C\n    else:\n        answer = A + D\nelif C <= D:\n    answer = B + C\nelse:\n    answer = B + D\n\nprint(answer)\n", "passed": true, "time": 0.2, "memory": 14360.0, "status": "done"}, {"code": "train1 = int(input())\ntrain2 = int(input())\nbus1 = int(input())\nbus2 = int(input())\n\na = min(train1, train2)\nb = min(bus1, bus2)\n\nprint(a + b)", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a,b)+min(c,d), flush=True)\n", "passed": true, "time": 0.15, "memory": 14152.0, "status": "done"}, {"code": "a=int(input())\nb=int(input())\nc=int(input())\nd=int(input())\n\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nbus = [A, B]\ntrain = [C, D]\n\nprint(min(bus) + min(train))", "passed": true, "time": 0.16, "memory": 14152.0, "status": "done"}, {"code": "# 092\n\n# 1.\u5024\u3092\u6b63\u3057\u304f\u53d6\u5f97\na =int(input())\nb =int(input())\nc =int(input())\nd =int(input())\n\n# 2.\u6b63\u3057\u304f\u51e6\u7406\nif a > b :\n    resalt1=int(b)\nelse :\n    resalt1=int(a)\n\nif c > d :\n    resalt2=int(d)\nelse :\n    resalt2=int(c)\n\nprint(resalt1 + resalt2)", "passed": true, "time": 0.23, "memory": 14264.0, "status": "done"}, {"code": "f = lambda: min(int(input()), int(input()))\nprint((f() + f()))\n", "passed": true, "time": 0.15, "memory": 14308.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\nprint((min(A,B)+min(C,D)))\n", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "# \u96fb\u8eca\u3000\u901a\u5e38\u5207\u7b26A\u5186\u3001\u4e57\u308a\u653e\u984cB\u5186\n# \u30d0\u30b9\u3000\u901a\u5e38\u5207\u7b26C\u5186\u3001\u4e57\u308a\u653e\u984cD\u5186\na = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\ntotal_fare = (min(a, b) + min(c, d))\n\nprint(total_fare)", "passed": true, "time": 1.73, "memory": 14032.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\n\nprint(min(A,B)+min(C,D))", "passed": true, "time": 0.22, "memory": 14180.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nsums = [A + C, A + D, B + C, B + D]\n\nprint(min(sums))", "passed": true, "time": 0.17, "memory": 14172.0, "status": "done"}, {"code": "\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\n\na = A + C\nb = A + D\nc = B + C\nd = B + D\nprint(min(a, b, c, d))", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "a= int(input())\nb=int(input())\nc=int(input())\nd=int(input())\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "print(sum([min(map(int,[input(),input()]))for _ in[0,1]]))", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nans = min(A, B) + min(C, D)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "# \u6570\u5024\u306e\u53d6\u5f97\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\n# \u6599\u91d1\u306e\u6700\u5b89\u5024\u3092\u51fa\u529b\ntrain = min(A,B)\nbus = min(C,D)\ntbsum = train + bus\nprint(tbsum)", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "A,B,C,D = [int(input()) for i in range(4)]\nprint(min(A, B)+min(C, D))", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\nd_list=[A,B]\nb_list=[C,D]\nb_list.sort()\nd_list.sort()\nprint(d_list[0]+b_list[0])", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint((min(a, b) + min(c, d)))\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a, b) + min(c, d))", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\nsum=0\nsum+=min(A,B)\nsum+=min(C,D)\nprint(sum)", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "l = []\nfor i in range(4):\n  l.append(int(input()))\nprint(min(l[0],l[1])+min(l[2],l[3]))", "passed": true, "time": 0.22, "memory": 14124.0, "status": "done"}, {"code": "a = [int(input()) for i in range(4)]\nx = min(a[0], a[1])\ny = min(a[2], a[3])\nprint((x + y))\n", "passed": true, "time": 0.14, "memory": 14036.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.18, "memory": 14092.0, "status": "done"}, {"code": "print(min(int(input()),int(input()))+min(int(input()),int(input())))", "passed": true, "time": 0.6, "memory": 14228.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nans = min(a+c, a+d, b+c, b+d)\n\nprint(ans)", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\nprice = [A + C, B + C, A + D, B + D]\nprint((min(price)))\n", "passed": true, "time": 0.24, "memory": 14184.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nresult = min(a, b) + min(c, d)\n# result = int(min(a, b)) + int(min(c, d))\nprint(result)", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\nprint((min(A, B) + min(C, D)))\n", "passed": true, "time": 0.36, "memory": 14152.0, "status": "done"}, {"code": "a,b,c,d=[int(input()) for i in range(4)]\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.63, "memory": 14300.0, "status": "done"}, {"code": "#ABC092\na = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a+c,b+c,a+d,b+d))", "passed": true, "time": 0.22, "memory": 14080.0, "status": "done"}, {"code": "a = [[],[]]\nfor i in range(2):\n    a[0].append(int(input()))\nfor i in range(2):\n    a[1].append(int(input()))\na[0].sort()\na[1].sort()\nprint(a[0][0] + a[1][0])", "passed": true, "time": 0.22, "memory": 14292.0, "status": "done"}, {"code": "def main():\n    a, b, c, d = (int(input()) for _ in range(4))\n    print(min(a, b) + min(c, d))\n\n\nmain()", "passed": true, "time": 0.23, "memory": 14208.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.16, "memory": 14292.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\nprint(min(A,B)+min(C,D))", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\ntrain_list = [A, B]\n\nbus_list = [C, D]\n\nanswer = min(train_list) + min(bus_list)\n\nprint(answer)\n", "passed": true, "time": 0.15, "memory": 14212.0, "status": "done"}, {"code": "A = [int(input()) for i in range(4)]\nprint(min(A[0],A[1]) + min(A[2],A[3]))", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\nprint(min(A,B)+min(C,D))", "passed": true, "time": 0.16, "memory": 14060.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\n\nd = int(input())\n\nprint( min(a, b) + min(c, d))", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nif A <= B:\n    train = A\nelse:\n    train = B\nif C <= D:\n    bus = C\nelse:\n    bus = D\n\nanswer = (train + bus)\nprint(answer)", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\n# \u96fb\u8eca\u306e\u904b\u8cc3\u30ea\u30b9\u30c8\ntrain = [a,b]\n# \u30d0\u30b9\u306e\u904b\u8cc3\u30ea\u30b9\u30c8\nbus = [c,d]\n# \u96fb\u8eca\u306e\u30d0\u30b9\u306e\u305d\u308c\u305e\u308c\u6700\u5b89\u5024\u3092\u8db3\u3057\u5408\u308f\u305b\u308b\nprint(min(train)+ min(bus))", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nlist01 = [a, b]\nlist02 = [c, d]\nprint(min(list01) + min(list02))", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\nprint((min(A, B) + min(C, D)))\n", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "a=int(input())\nb=int(input())\nc=int(input())\nd=int(input())\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "a,b,c,d = [int(input()) for _ in range(4)]\nprint(min(a,b) + min(c,d))", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "a=int(input())\nb=int(input())\nc=int(input())\nd=int(input())\n\nprint((min(a,b)+min(c,d)))\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "\na=int(input())\nb=int(input())\nc=int(input())\nd=int(input())\n\nprint((min(a,b)+min(c,d)))\n\n", "passed": true, "time": 0.23, "memory": 14256.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.3, "memory": 14060.0, "status": "done"}, {"code": "'''\n\u554f\u984c\uff1a\n    \u3042\u306a\u305f\u306f\u3001\u96fb\u8eca\u3068\u30d0\u30b9\u3092\u4e57\u308a\u7d99\u3044\u3067\u65c5\u884c\u3092\u3059\u308b\u8a08\u753b\u3092\u7acb\u3066\u307e\u3057\u305f\u3002\n    \u96fb\u8eca\u306f\u65c5\u7a0b\u306b\u6cbf\u3063\u3066\u901a\u5e38\u306e\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 A\u5186\u304b\u304b\u308a\u3001\n    \u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 B\u5186\u304b\u304b\u308a\u307e\u3059\u3002\n    \u30d0\u30b9\u306f\u65c5\u7a0b\u306b\u6cbf\u3063\u3066\u901a\u5e38\u306e\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 C\u5186\u304b\u304b\u308a\u3001\n    \u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 D\u5186\u304b\u304b\u308a\u307e\u3059\u3002\n\n    \u96fb\u8eca\u304a\u3088\u3073\u30d0\u30b9\u306b\u3064\u3044\u3066\n    \u901a\u5e38\u306e\u5207\u7b26\u3092\u8cb7\u3046\u304b\u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u304b\u3092\u3046\u307e\u304f\u9078\u3093\u3060\u3068\u304d\u306e\u3001\n    \u904b\u8cc3\u306e\u5408\u8a08\u306e\u6700\u5c0f\u5024\u3092\u6c42\u3081\u3066\u304f\u3060\u3055\u3044\u3002\n'''\n\n'''\n\u5236\u7d04\uff1a\n    1 \u2264 A \u2264 1,000\n    1 \u2264 B \u2264 1,000\n    1 \u2264 C \u2264 1,000\n    1 \u2264 D \u2264 1,000\n    \u5165\u529b\u5024\u306f\u3059\u3079\u3066\u6574\u6570\u3067\u3042\u308b\u3002\n'''\n\n# \u6a19\u6e96\u5165\u529b\u304b\u3089 A, B, C, D \u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\na = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\n# \u4e57\u308a\u63db\u3048\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u30ea\u30b9\u30c8\u306b\u5165\u308c\u3066\u3001\u30ea\u30b9\u30c8\u306e\u6700\u5c0f\u5024\u3092\u51fa\u529b\u3059\u308b\ntravel_costs = [a + c, a + d, b + c, b + d]\n\nprint((min(travel_costs)))\n", "passed": true, "time": 0.16, "memory": 14052.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\nprint(min(A,B)+min(C,D))", "passed": true, "time": 1.06, "memory": 14268.0, "status": "done"}, {"code": "a=int(input())\nb=int(input())\nc=int(input())\nd=int(input())\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.23, "memory": 14288.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\ntrain_plice = min(A,B)\nbus_plice = min(C,D)\n\nmin_plice = train_plice + bus_plice\nprint(min_plice)", "passed": true, "time": 0.31, "memory": 14256.0, "status": "done"}, {"code": "a=int(input())\nb=int(input())\nc=int(input())\nd=int(input())\n\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.24, "memory": 14256.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a + c, a + d, b + c, b + d))", "passed": true, "time": 0.18, "memory": 14184.0, "status": "done"}, {"code": "train=[]\nbus=[]\ntrain.append(int(input()))\ntrain.append(int(input()))\nbus.append(int(input()))\nbus.append(int(input()))\nprint(min(train)+min(bus))", "passed": true, "time": 0.22, "memory": 14060.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nif A < B:\n    train = A\nelse:\n    train = B\n\nif C < D:\n    bus = C\nelse:\n    bus = D\n\nprint(train + bus)", "passed": true, "time": 0.26, "memory": 14112.0, "status": "done"}, {"code": "t1=int(input())\nt2=int(input())\nb1=int(input())\nb2=int(input())\n\nprint((min(t1, t2)+min(b1, b2)))\n", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a,b) + min(c,d))", "passed": true, "time": 0.24, "memory": 14156.0, "status": "done"}, {"code": "l=[int(input()) for _ in range(2)]\nl1=[int(input()) for _ in range(2)]\nl.sort()\nl1.sort()\na=l[0]+l1[0]\nprint(a)", "passed": true, "time": 0.17, "memory": 14312.0, "status": "done"}, {"code": "# \u30d0\u30b9\u3068\u96fb\u8eca\u306e\u7d44\u307f\u5408\u308f\u305b\u904b\u8cc3\u306e\u6700\u5c0f\u5024\u3092\u6c42\u3081\u308b\n\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nfare = [A+C, A+D, B+C, B+D]\nprint((min(fare)))\n", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "print(min(int(input()),int(input()))+min(int(input()),int(input())))", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "# A - Traveling Budget\n# https://atcoder.jp/contests/abc092/tasks/abc092_a\n\ntrain = []\nbus = []\n\ntrain.append(int(input()))\ntrain.append(int(input()))\nbus.append(int(input()))\nbus.append(int(input()))\n\nprint((min(train) + min(bus)))\n", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nprint(min(A, B) + min(C, D))", "passed": true, "time": 0.15, "memory": 14060.0, "status": "done"}, {"code": "# 092a\n\ndef atc_092a(ABCD: int) -> int:\n    return min(ABCD[0], ABCD[1]) + min(ABCD[2], ABCD[3])\n\n\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nABCD = [A, B, C, D]\nprint((atc_092a(ABCD)))\n", "passed": true, "time": 0.15, "memory": 14292.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\n\nd = int(input())\n\ne = min(a, b)\nf = min(c, d)\n\nprint((e+f))\n", "passed": true, "time": 0.15, "memory": 14240.0, "status": "done"}, {"code": "li=[]\nans=0\nfor i in range(4):\n  li.append(int(input()))\nif li[0]<li[1]:\n  ans+=li[0]\nelse:\n  ans+=li[1]\nif li[2]<li[3]:\n  ans+=li[2]\nelse:\n  ans+=li[3]\nprint(ans)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\n\nd = int(input())\n\nif a > b:\n    e = b\nelse:\n    e = a\n\nif c > d:\n    f = d\nelse:\n    f = c\n\nprint((e + f))\n", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a, b) + min(c, d))", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "a, b, c, d = (int(input()) for n in range(0, 4))\nprint(min(a, b) + min(c, d))", "passed": true, "time": 0.17, "memory": 14120.0, "status": "done"}, {"code": "A=int(input())\nB=int(input())\nC=int(input())\nD=int(input())\nprint(min(A,B) + min(C,D))", "passed": true, "time": 0.19, "memory": 14200.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nprint(min(A,B) + min(C,D))", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "# A, B, C, D = map(int,input().split())\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nfee = [A+C,A+D,B+C,B+D]\nfee.sort()\nprint(fee[0])", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "# 092_a\n# \"\"\"\n#  \u3042\u306a\u305f\u306f\u3001\u96fb\u8eca\u3068\u30d0\u30b9\u3092\u4e57\u308a\u7d99\u3044\u3067\u65c5\u884c\u3092\u3059\u308b\u8a08\u753b\u3092\u7acb\u3066\u307e\u3057\u305f\u3002\n#  \u96fb\u8eca\u306f\u65c5\u7a0b\u306b\u6cbf\u3063\u3066\u901a\u5e38\u306e\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 A\u5186\u304b\u304b\u308a\u3001\n#  \u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068B\u5186\u304b\u304b\u308a\u307e\u3059\u3002\n#  \u30d0\u30b9\u306f\u65c5\u7a0b\u306b\u6cbf\u3063\u3066\u901a\u5e38\u306e\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 C\u5186\u304b\u304b\u308a\u3001\n#  \u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 D\u5186\u304b\u304b\u308a\u307e\u3059\u3002\n#\n# \u96fb\u8eca\u304a\u3088\u3073\u30d0\u30b9\u306b\u3064\u3044\u3066\u901a\u5e38\u306e\u5207\u7b26\u3092\u8cb7\u3046\u304b\u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u304b\u3092\u3046\u307e\u304f\u9078\u3093\u3060\u3068\u304d\u306e\u3001\u904b\u8cc3\u306e\u5408\u8a08\u306e\u6700\u5c0f\u5024\u3092\u6c42\u3081\u3066\u304f\u3060\u3055\u3044\u3002\n# \"\"\"\n\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\nif (1 <= A & A <= 1000) & (1 <= B & B <= 1000) & (1 <= C & C <= 1000) & (1 <= D & D <= 1000):\n    print(((min(A, B)) + (min(C, D))))\n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\ntrain = [A,B]\nbus = [C,D]\n\nprint(min(train) + min(bus))", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "#!/usr/bin/env python3\n\ndef main():\n    a, b, c, d = (int(input()) for i in range(4))\n    print((min(a, b) + min(c, d)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "print(min(int(input()), int(input())) + min(int(input()), int(input())))", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nprint((min(A+C,A+D,B+C,B+D)))\n", "passed": true, "time": 0.22, "memory": 14044.0, "status": "done"}, {"code": "A, B, C, D = [int(input()) for i in  range(4)]\n\nprint(min(A,B)+min(C,D))", "passed": true, "time": 0.38, "memory": 14284.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc =  int(input())\nd = int(input())\n\ntrain = min(a,b)\nbus = min(c,d)\n\nprint(train + bus)", "passed": true, "time": 0.16, "memory": 14060.0, "status": "done"}, {"code": "a,b,c,d=map(int,[input(),input(),input(),input()])\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.15, "memory": 14204.0, "status": "done"}, {"code": "bus_a = int(input())\nbus_b = int(input())\ntrain_a = int(input())\ntrain_b = int(input())\n\nfee_list = [bus_a + train_a, bus_a + train_b, bus_b + train_a, bus_b + train_b]\nfee_list.sort()\nprint((fee_list[0]))\n", "passed": true, "time": 0.18, "memory": 14308.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nprint(min([A,B]) + min([C,D]))", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\ntrain = [a, b]\nbus = [c, d]\n\nprint((min(train) + min(bus)))\n", "passed": true, "time": 0.23, "memory": 14300.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a+c,a+d,b+c,b+d))", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\n\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "print(min([int(input()), int(input())]) + min([int(input()), int(input())]))", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "# 092a\n\ndef atc_092a(ABCD: int) -> int:\n    return min(ABCD[0], ABCD[1]) + min(ABCD[2], ABCD[3])\n\n\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nABCD = [A, B, C, D]\nprint(atc_092a(ABCD))", "passed": true, "time": 0.14, "memory": 14364.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a, b) + min(c, d))", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "S_list = [int(input()) for i in range(4)]\na,b,c,d = S_list\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "# \u3042\u306a\u305f\u306f\u3001\u96fb\u8eca\u3068\u30d0\u30b9\u3092\u4e57\u308a\u7d99\u3044\u3067\u65c5\u884c\u3092\u3059\u308b\u8a08\u753b\u3092\u7acb\u3066\u307e\u3057\u305f\u3002\n# \u96fb\u8eca\u306f\u65c5\u7a0b\u306b\u6cbf\u3063\u3066\u901a\u5e38\u306e\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 A \u5186\u304b\u304b\u308a\u3001\u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 B \u5186\u304b\u304b\u308a\u307e\u3059\u3002\n# \u30d0\u30b9\u306f\u65c5\u7a0b\u306b\u6cbf\u3063\u3066\u901a\u5e38\u306e\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 C \u5186\u304b\u304b\u308a\u3001\u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u3068 D \u5186\u304b\u304b\u308a\u307e\u3059\u3002 \n# \u96fb\u8eca\u304a\u3088\u3073\u30d0\u30b9\u306b\u3064\u3044\u3066\u901a\u5e38\u306e\u5207\u7b26\u3092\u8cb7\u3046\u304b\u4e57\u308a\u653e\u984c\u304d\u3063\u3077\u3092\u8cb7\u3046\u304b\u3092\u3046\u307e\u304f\u9078\u3093\u3060\u3068\u304d\u306e\u3001\u904b\u8cc3\u306e\u5408\u8a08\u306e\u6700\u5c0f\u5024\u3092\u6c42\u3081\u3066\u304f\u3060\u3055\u3044\u3002\n\nA = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\n\nx = min(A, B)\ny = min(C, D)\n\nprint(x + y)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "a,b,c,d=[int(input()) for i in range(4)]\nprint(min(a,b)+min(c,d))", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "A = int(input())\nB = int(input())\nC = int(input())\nD = int(input())\nprint(min(A,B)+min(C,D))", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "a = int(input())\nb = int(input())\nc = int(input())\nd = int(input())\nprint(min(a,b) + min(c,d))", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}]