p, q, r = map(int, input().split())
time = [p, q, r]

print(sum(time) - max(time)) p, q, r = map(int, input().split()) p map(int, input().split()) map int input().split() ().split () input split q r time = [p, q, r] time [p, q, r] p q r print(sum(time) - max(time)) print sum(time) - max(time) sum(time) sum time max(time) max time p, q, r = map(int, input().split()) map(int, input().split()) p time = [p, q, r] [p, q, r] time r = map(int, input().split()) map(int, input().split()) r q, r = map(int, input().split()) map(int, input().split()) q
p, q, r = map(int, input().split())
time = [p, q, r]

print(sum(time) - max(time))
