import sys
import itertools
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A = LI()

A = list(itertools.combinations(A,2))
jikans = []
for a in A:
    a[0] + a[1]
    jikans.append(a[0] + a[1])

jikans.sort()
print(jikans[0]) import sys sys import itertools itertools def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS A = LI() A LI() LI A = list(itertools.combinations(A,2)) A list(itertools.combinations(A,2)) list itertools.combinations(A,2) itertools.combinations itertools combinations A 2 jikans = [] jikans [] for a in A:
    a[0] + a[1]
    jikans.append(a[0] + a[1]) a A a[0] + a[1] a[0] a 0 a[1] a 1 jikans.append(a[0] + a[1]) jikans.append jikans append a[0] + a[1] a[0] a 0 a[1] a 1 jikans.sort() jikans.sort jikans sort print(jikans[0]) print jikans[0] jikans 0 A = LI() LI() A def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S jikans = [] [] jikans A = list(itertools.combinations(A,2)) list(itertools.combinations(A,2)) A def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I
import sys
import itertools
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A = LI()

A = list(itertools.combinations(A,2))
jikans = []
for a in A:
    a[0] + a[1]
    jikans.append(a[0] + a[1])

jikans.sort()
print(jikans[0])