try:
    n=list(map(int, input().strip().split()))
    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
    minscore='9999999999'
    for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
    print(minscore)
    
except:
    print('')
 try:
    n=list(map(int, input().strip().split()))
    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
    minscore='9999999999'
    for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
    print(minscore)
    
except:
    print('') except:
    print('') print('') print '' n=list(map(int, input().strip().split())) n list(map(int, input().strip().split())) list map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split lis1=[] lis1 [] for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
     i range(0,len(n)) range 0 len(n) len n for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
     a range(0,len(n)) range 0 len(n) len n if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
     a!=i a i z=(int(n[a])+int(n[i])) z int(n[a])+int(n[i]) int(n[a]) int n[a] n a int(n[i]) int n[i] n i lis1.append(z) lis1.append lis1 append z minscore='9999999999' minscore '9999999999' for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
     i range(0,len(lis1)) range 0 len(lis1) len lis1 if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
     float(minscore)>float(lis1[i]) float(minscore) float minscore float(lis1[i]) float lis1[i] lis1 i minscore=lis1[i] minscore lis1[i] lis1 i print(minscore) print minscore minscore=lis1[i] lis1[i] minscore minscore='9999999999' '9999999999' minscore z=(int(n[a])+int(n[i])) int(n[a])+int(n[i]) z n=list(map(int, input().strip().split())) list(map(int, input().strip().split())) n lis1=[] [] lis1
try:
    n=list(map(int, input().strip().split()))
    lis1=[]
    for i in range(0,len(n)):
        for a in range(0,len(n)):
            if a!=i:
                z=(int(n[a])+int(n[i]))
                lis1.append(z)
            
    minscore='9999999999'
    for i in range(0,len(lis1)):
        if float(minscore)>float(lis1[i]):
            minscore=lis1[i]
    
    print(minscore)
    
except:
    print('')

