cost = [int(s) for s in input().split()]
min_cost = 0
for i in range(3):
    total_cost = cost[i] + cost[(i + 1) % 3] 
    if (min_cost == 0) | (total_cost < min_cost):
        min_cost = total_cost
print(min_cost) int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s cost = [int(s) for s in input().split()] cost [int(s) for s in input().split()] min_cost = 0 min_cost 0 for i in range(3):
    total_cost = cost[i] + cost[(i + 1) % 3] 
    if (min_cost == 0) | (total_cost < min_cost):
        min_cost = total_cost i range(3) range 3 total_cost = cost[i] + cost[(i + 1) % 3] total_cost cost[i] + cost[(i + 1) % 3] cost[i] cost i cost[(i + 1) % 3] cost (i + 1) % 3 i + 1 i 1 3 if (min_cost == 0) | (total_cost < min_cost):
        min_cost = total_cost (min_cost == 0) | (total_cost < min_cost) min_cost == 0 min_cost 0 total_cost < min_cost total_cost min_cost min_cost = total_cost min_cost total_cost print(min_cost) print min_cost cost = [int(s) for s in input().split()] [int(s) for s in input().split()] cost total_cost = cost[i] + cost[(i + 1) % 3] cost[i] + cost[(i + 1) % 3] total_cost min_cost = total_cost total_cost min_cost min_cost = 0 0 min_cost
cost = [int(s) for s in input().split()]
min_cost = 0
for i in range(3):
    total_cost = cost[i] + cost[(i + 1) % 3] 
    if (min_cost == 0) | (total_cost < min_cost):
        min_cost = total_cost
print(min_cost)