import itertools
p,q,r = map(int,input().split())
time = []
time.append(p)
time.append(q)
time.append(r)
time_min = float('inf')
for item in itertools.combinations(time,2):
    time_min = min(sum(item), time_min)
print(time_min) import itertools itertools p,q,r = map(int,input().split()) p map(int,input().split()) map int input().split() ().split () input split q r time = [] time [] time.append(p) time.append time append p time.append(q) time.append time append q time.append(r) time.append time append r time_min = float('inf') time_min float('inf') float 'inf' for item in itertools.combinations(time,2):
    time_min = min(sum(item), time_min) item itertools.combinations(time,2) itertools.combinations itertools combinations time 2 time_min = min(sum(item), time_min) time_min min(sum(item), time_min) min sum(item) sum item time_min print(time_min) print time_min time_min = min(sum(item), time_min) min(sum(item), time_min) time_min r = map(int,input().split()) map(int,input().split()) r time = [] [] time q,r = map(int,input().split()) map(int,input().split()) q p,q,r = map(int,input().split()) map(int,input().split()) p time_min = float('inf') float('inf') time_min
import itertools
p,q,r = map(int,input().split())
time = []
time.append(p)
time.append(q)
time.append(r)
time_min = float('inf')
for item in itertools.combinations(time,2):
    time_min = min(sum(item), time_min)
print(time_min)