Problem:
 Score : 100 points    Problem Statement There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?      Constraints  1 \leq P,Q,R \leq 100  All values in input are integers.         Input Input is given from Standard Input in the following format:  P  Q  R       Output Print the minimum possible sum of the flight times.        Sample Input 1 1 3 4      Sample Output 1 4   The sum of the flight times in the route A \rightarrow B \rightarrow C: 1 + 3 = 4 hours  The sum of the flight times in the route A \rightarrow C \rightarrow C: 4 + 3 = 7 hours  The sum of the flight times in the route B \rightarrow A \rightarrow C: 1 + 4 = 5 hours  The sum of the flight times in the route B \rightarrow C \rightarrow A: 3 + 4 = 7 hours  The sum of the flight times in the route C \rightarrow A \rightarrow B: 4 + 1 = 5 hours  The sum of the flight times in the route C \rightarrow B \rightarrow A: 3 + 1 = 4 hours   The minimum of these is 4 hours.       Sample Input 2 3 2 3      Sample Output 2 5

Solution (Python):
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

P, Q, R = rl()

print(min(P+Q, Q+R, R+P))

Solution (Python):
P, Q, R = map(int, input().split())
print(P + Q + R - max(P, Q, R))

Solution (Python):
p,q,r = map(int, input().split())
l = [p,q,r]
l.sort()
print(sum(l[:2]))

Solution (Python):
import sys
import heapq

array_pqr = list(map(int,input().split()))

if not ( 1 <= array_pqr[0] <= 100 and 1 <= array_pqr[1] <= 100 and 1 <= array_pqr[2] <= 100 ): sys.exit()

print(sum(heapq.nsmallest(2,array_pqr)))

Solution (Python):
p = list(map(int, input().split()))
m = max(p)
print(sum(p) - m)

Solution (Python):
import itertools
p, q, r = map(int, input().split())
mn = 10 ** 9
for v in itertools.combinations([p, q, r], 2):
    mn = min(mn, v[0]+v[1])
print(mn)

Solution (Python):
List = list(map(int, input().split()))
List.sort()
res = List[0]+List[1]
print(res)

Solution (Python):
P, Q, R = map(int, input().split())

PQ = P+Q
PR = P+R
QR = Q+R

print(min([PQ,PR,QR]))

Solution (Python):
P, Q, R = map(int, input().split())
ans = P + Q + R - max([P, Q, R])
print(ans)

Solution (Python):
pqr = list(map(int, input().split()))
print(sum(pqr) - max(pqr))

Solution (Python):
l = list(map(int,input().split()))
l = sorted(l)
print(sum(l[:2]))

Solution (Python):
def main():
 p,q,r = map(int,input().split())
 print(min(p + q, q + r, p + r))
main()

Solution (Python):
p,q,r = map(int, input().split())

print(min(p+q,q+r,r+p))

Solution (Python):

def input_array():
	return list(map(int,input().split()))

a=input_array()

ALL=sum(a)
MAX=max(a)

print(ALL-MAX)

Solution (Python):
P,Q,R = map(int,input().split())

print(min(P+Q,Q+R,R+P))

Solution (Python):
P, Q, R = list(map(int, input().split()))

print(P + Q + R - max(P, Q, R))

Solution (Python):
p, q, r = map(int, input().split())
res = p + q + r - max(p, q, r)
print(res)

Solution (Python):
l= list(map(int, input().split()))
l.sort
a=l[0]+l[1]+l[2]-max(l)
print (a)

Solution (Python):
p, q, r = map(int, input().split())

print(min(p + q, q + r, r + p))

Solution (Python):
P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+P))

Solution (Python):
l = list(map(int,input().split()))

l.sort()

print(sum(l[:2]))

Solution (Python):
l=list(map(int,input().split()))
l.sort()
print(l[0]+l[1])

Solution (Python):
P,Q,R = map(int, input().split())

ABC = P+Q
ACB = R+Q
BAC = P+R
BCA = Q+R
CAB = R+P
CBA = Q+P

print(min(ABC,ACB,BAC,BCA,CAB,CBA))

Solution (Python):
a, b, c = list(map(int, input().split()))

print(min(a+b,b+c,a+c))

Solution (Python):
check = list(input().split())
check.sort()
print(int(check[0]) + int(check[1]))

Solution (Python):
p,q,r = map(int,input().split())
print(min((p+q),(p+r),(q+r)))

Solution (Python):
p,q,r  =map(int,input().split())

a = p+q
b = p+r
c = q+r

print(min(a,b,c))

Solution (Python):
lst = list(map(int, input().split()))
lst.sort()
print(lst[0] + lst[1])

Solution (Python):
P,Q,R=map(int, input().split())

ans=min(P+Q,Q+R,R+P)

print(ans)

Solution (Python):
a, b, c = map(int, input().split())
print(min(a + b, b + c, a + c))

Solution (Python):
p , q , r = map(int,input().split())
duration = [ p + q , q + r , r + p ]
print (min(duration))

Solution (Python):
p, q, r = map(int, input().split())
print(p + q + r - max(p, q, r))

Solution (Python):
p = list(map(int, input().split()))
print(sum(p) - max(p))

Solution (Python):
P,Q,R = map(int, input().split())

print(min([P + Q, P + R, Q + R]))

Solution (Python):
A = list(map(int,input().split()))
A.sort()
print(A[0]+A[1])

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):
A = sorted(list(map(int, input().split())), reverse=False)
print(A[0]+A[1])

Solution (Python):
import sys
input = sys.stdin.readline

P=list(map(int,input().split()))
print(sum(P)-max(P))

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    p, q, r = map(int, input().split())
    print(min(p+q, p+r, q+r))
    
if __name__ == '__main__':
    main()

Solution (Python):


li = list(map(int, input().split()))
print(sum(sorted(li)[:2]))

Solution (Python):
list = list(map(int, input().split()))

new_list = sorted(list)
print(new_list[0]+new_list[1])

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations

from heapq import heapify,heappop,heappush


from functools import reduce,lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

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

    print(min(p+q,q+r,r+p))




if __name__ == "__main__":
    main()

Solution (Python):
A = sorted(list(map(int, input().split())))
print(A[0]+A[1])

Solution (Python):
print(sum(sorted(list(map(int,input().split())))[:2]))

Solution (Python):
import sys
import itertools
rl = lambda: list(map(int, sys.stdin.readline().split()))
print(min(list(map(sum, itertools.combinations(rl(), 2)))))

Solution (Python):
import sys
import itertools
rl = lambda: list(map(int, sys.stdin.readline().split()))
print(min(list(map(sum, itertools.combinations(rl(), 2)))))

Solution (Python):
def main():
    a,b,c=map(int,input().split(' '))
    print(sum([a,b,c])-max(a,b,c))

main()

Solution (Python):
p, q, r = map(int, input().split())
ans = sum([p, q, r]) - max([p, q, r])
print(ans)

Solution (Python):
import itertools
l = list(map(int, input().split()))
p = itertools.permutations(l, 2)
a = [sum(i) for i in p]
print(min(a))

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):
P, Q, R = map(int, input().split())
ans = min(P+Q, Q+R, R+P)
print(ans)

Solution (Python):
l = list(map(int, input().split()))
l.sort()
print(l[0] + l[1])

Solution (Python):
p,q,r = sorted(list(map(int,input().split())))
print(p + q)

Solution (Python):
P, Q, R = map(int, input().split())

num_list = [P, Q, R]

num_list.sort()

n = num_list[0] + num_list[1]

print(n)

Solution (Python):
a,b,c = map(int,input().split())
print(min(a+b,b+c,c+a))

Solution (Python):
P,Q,R = (int(x) for x in input().split())
print(min(P+Q,P+R,Q+R))

Solution (Python):
P,Q,R = (int(x) for x in input().split())
print(min(P+Q,P+R,Q+R))

Solution (Python):
lists= list(map(int, input().split()))

sorted_lists = sorted(lists)
print(sorted_lists[0] + sorted_lists[1])

Solution (Python):
times = list(map(int, input().split()))
times.sort()
print(times[0] + times[1])

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):

P,Q,R=map(int,input().split())

print(min(P+Q,Q+P,R+P,Q+R))

Solution (Python):
import heapq
pqr = list(map(int,input().split()))
print(sum(heapq.nsmallest(2,pqr)))

Solution (Python):
a, b, c = map(int, input().split())
d = a + b
f = a + c
g = b + c
my_list = [d, f, g]
h = my_list.sort()
i = my_list[0]
print(i)

Solution (Python):
s = sorted(list(map(int, input().split())))
print(sum(s[:2]))

Solution (Python):
a = list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
p, q, r = map(int, input().split())
ans = min(p+q, q+r, r+p)
print(ans)

Solution (Python):
a = list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
p,q,r=map(int, input().split())
print(p+q+r-max(p,q,r))

Solution (Python):

(*a, ) = map(int, input().split())
a.sort()
print(sum(a[:2]))

Solution (Python):
A = list(map(int, input().split()))

print(sum(A) - max(A))

Solution (Python):
p = list(map(int,input().split()))
p.sort()
print(p[0]+p[1])

Solution (Python):


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

print(p+q+r-max(p,max(q,r)))

Solution (Python):
li = [int(x) for x in input().split()]
li.sort()
print(li[0] + li[1])

Solution (Python):
p,q,r, = map(int,input().split())
print(min(p+q,p+r,r+q))

Solution (Python):
P,Q,R = map(int,input().split())
print(min(P+Q,Q+R,P+R))

Solution (Python):
P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+P))

Solution (Python):
P, Q, R = list(map(int, input().split()))

print(min(P+Q, Q+R, R+P))

Solution (Python):
a,b,c = [int(a) for a in input().split()]
d = min(a+b,b+c,c+a)
print (d)

Solution (Python):
print(sum(sorted(map(int,input().split()))[:2]))

Solution (Python):
a=list(map(int, input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
a = list(map(int, input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):
time = sorted(list(map(int, input().split())))
print(time[0] + time[1])

Solution (Python):


l = sorted(list(map(int, input().split())))

print(l[0] + l[1])

Solution (Python):
def main():
    p,q,r = map(int, input().split())
    min_time = min([p+q, q+r, r+p])
    print(min_time)

if __name__ == '__main__':
	main()

Solution (Python):
print(sum(sorted(list(map(int, input().split())))[:2]))

Solution (Python):
def main():
    A = sorted(list(map(int, input().split())))
    print(sum(A[:2]))


if __name__ == '__main__':
    main()

Solution (Python):
a=list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
from itertools import permutations 
perm = permutations(map(int,input().split()), 2) 
ans=[]
for i in list(perm): 
  ans.append(sum(i))
print(min(ans))

Solution (Python):
P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+P))

Solution (Python):
P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+P))

Solution (Python):
l = list(map(int,input().split()))
l = sorted(l)
print(l[0]+l[1])

Solution (Python):
p,q,r = map(int,input().split())
print(min(p+q,p+r,q+r))

Solution (Python):
l = list(map(int, input().split()))
l.sort()
print(sum(l[:2]))

Solution (Python):
AIR = list(map(int, input().split()))
print(sum(sorted(AIR)[0:2]))

Solution (Python):
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('')

Solution (Python):
a, b, c = [int(x) for x in input("").split(" ")]
print((a+b+c) - max(a, b, c))

Solution (Python):
lst = list(map(int, input().split()))
print(sum(lst) - max(lst))

Solution (Python):
p,q,r = map(int,input().split())
pq = p+q
qr = q+r
rp = r+p
print(min(pq,qr,rp))

Solution (Python):
p, q, r = map(int, input().split())
print(min([p+q, q+r, r+p]))

Solution (Python):
a = map(int, input().split())
a = list(a)
a.sort()
print (a[0] + a[1])

Solution (Python):
a,b,c=map(int,input().split())
print(min(min((a+b),(a+c)),(b+c)))

Solution (Python):
def main():
    a,b,c = map(int, input().split())
    nums = []
    nums.append(a + b)
    nums.append(a + c)
    nums.append(b + c)
    nums.sort()
    print(nums[0])
main()

Solution (Python):
a = map(int, input().split())
a = list(a)
a.sort()
print (a[0] + a[1])

Solution (Python):
p=list(map(int,input().split()))
p.sort()

ans=p[0]+p[1]
print(ans)

Solution (Python):
def main():
    A = sorted(list(map(int, input().split())))
    print(A[0] + A[1])


if __name__ == '__main__':
    main()

Solution (Python):

from sys import stdin
input = stdin.readline

A = list(map(int, input().split()))

A.sort()

print(A[0] + A[1])

Solution (Python):
arr = input().split()
p,q,r=int(arr[0]),int(arr[1]),int(arr[2])
print(min(p+q,p+r,q+r))

Solution (Python):
p,q,r=map(int,input().split())
print(min(min((p+q),(p+r)),(q+r)))

Solution (Python):
print(sum(sorted(map(int,input().split()))[:2]))

Solution (Python):
P,Q,R = sorted(map(int,input().split()))
print(P+Q)

Solution (Python):
a,b,c= input().split()
a= int(a)
b= int(b)
c=int(c)
x= a+b
y= b+c
z= a+c
m= min(x,y,z)
print(m)

Solution (Python):
p, q, r = map(int, input(). split())
print(min(p + q, q + r, r + p))

Solution (Python):
l=[int(x) for x in input().rstrip().split()]
l.sort()
print(sum(l[:2]))

Solution (Python):
import sys
sys.setrecursionlimit(10**6)



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







ans = min([p+q, p+r, q+r])

print(ans)

Solution (Python):
X=input()
a, b, c= map(str, X.split())
a ,b ,c=int(a), int(b), int(c)
test1=a+b
test2=a+c
test3=b+c
list=[]
list.append(test1)
list.append(test2)
list.append(test3)
print(min(list))

Solution (Python):
a, b, c = map(int, input().split())

Li = [a, b, c]
Li.sort()

print(Li[0] + Li[1])

Solution (Python):
p,q,r=map(int,input().split())
n=max(p,q,r)
print(p+q+r-n)

Solution (Python):
arr=list(map(int,input().split()))
arr=sorted(arr)


print(sum(arr[0:2]))

Solution (Python):
P, Q, R = map(int, input().split())

print(min(P+Q, Q+R, R+P))

Solution (Python):
P,Q,R=map(int,input().split())
a=P+Q
b=R+Q
c=P+R
print(min(a,b,c))

Solution (Python):


l = list(map(int, input().split()))
max = l[0]
sum = 0

for i in range(len(l)):
    sum += l[i]
    if l[i] > max:
        max = l[i]
    
print(sum - max)

Solution (Python):
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

    P,Q,R = LMIIS()
    print(min(P+Q,Q+R,R+P))
    
main()

Solution (Python):
def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

P, Q, R = MI()

print(P + Q + R - max(P, Q, R))

Solution (Python):
p,q,r = map(int,input().split())
a = p+q
b = q+r
c = r+p

print(min(a,b,c))

Solution (Python):
L = list(map(int,input().split()))
L.sort()

print(sum(L[:2]))

Solution (Python):
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a,b,c = I2()
    print(min(a+b,b+c,a+c))

Solution (Python):
P, Q, R = map(int, input().split())
print(P + Q + R - max(P, Q, R))

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    (*PQR,) = map(int, readline().split())
    ans = sum(PQR) - max(PQR)
    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
P,Q,R = [res[i] for i in (0,1,2)]
if (P>=1 and P<=100) and (Q>=1 and Q<=100) and (R>=1 and R<=100):
    t1=P+Q
    t2=Q+R
    t3=P+R
    L=[t1,t2,t3]
    L.sort()
    st=L[0]
    print(st)
else:
	print("Error")

Solution (Python):
def solve():
    p, q, r = map(int, input().split())
    print(min(p+q, q+r, p+r))

if __name__ == '__main__':
    solve()

Solution (Python):
f = [int(i) for i in input().split() if i.isdigit()]
f.sort()
print(f[0] + f[1])

Solution (Python):
l = list(map(int,input().split()))

l.sort()

print(l[0]+l[1])

Solution (Python):
a = list(map(int,input().split()))
print(sum(sorted(a)[0:2]))

Solution (Python):
P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, P+R))

Solution (Python):
x,y,z = [int(a) for a in input().split()]

print(min(min(x+y,y+z),x+z))

Solution (Python):
a, b, c = map(int, input().split())
d = a + b
e = b + c
f = c + a
print(min(d,e,f))

Solution (Python):
L = list(map(int,input().split()))
L.sort()
print(L[0]+L[1])

Solution (Python):
A = [int(x) for x in input().split()]
m = max(A)
A.remove(m)
print(sum(A))

Solution (Python):
P,Q,R = sorted(map(int,input().split()))

print(P+Q)

Solution (Python):
T = list(map(int, input().split()))

T.remove(max(T))
print(sum(T))

Solution (Python):
x = list(map(int, input().split()))

x.sort()

print(x[0]+x[1])

Solution (Python):
a, b, c = map(int, input().split())
print(min(a+b, a+c, b+c))

Solution (Python):
pqr = sorted(list(map(int, input().split())))

print(sum(pqr[:2]))

Solution (Python):
lis=list(map(int,input().split()))
print(sum(lis)-max(lis))

Solution (Python):
import itertools
val = 0
for i in itertools.permutations(list(map(int, input().split())), 2):
    if val == 0:
        val = sum(i)
    else:
        val = min(sum(i), val)
print(val)

Solution (Python):
P=list(map(int,input().split()))
print(sum(P)-max(P))

Solution (Python):
print(sum(sorted(list(map(int, input().split())))[:2]))

Solution (Python):


List=list(map(int, input().split()))
List=sorted(List)
print(List[0]+List[1])

Solution (Python):
ps = list(map(int, input().split()))

print(sum(ps) - max(ps))

Solution (Python):
a,b,c=map(int,input().split())
k=a+b+c
print(k-max(max(a,b),c))

Solution (Python):
def main():
    x = list(map(int, input().split()))
    print(sum(x) - max(x))
    
if __name__ == "__main__":
    main()

Solution (Python):
from itertools import combinations

s=list(map(int,input().split()))
t=list(combinations(s,2))
ans=float('inf')
for i in t:
  ans=min(ans,sum(i))
print(ans)

Solution (Python):
p,q,r=map(int,input().split())
a=p+q
b=q+r
c=r+p
print(min(a,b,c))

Solution (Python):
P, Q, R = map(int, input().split())
print(P+Q+R-max(P, Q, R))

Solution (Python):
A = list(map(int, input().split()))
print(sum(A) - max(A))

Solution (Python):
p,q,r=map(int,input().split());print(min(p+q,q+r,r+p))

Solution (Python):
P,Q,R=map(int,input().split())
print(min(P+Q,Q+R,R+P))

Solution (Python):
p,q,r=map(int,input().split())
print(min(p+q,p+r,q+r))

Solution (Python):
p,q,r = map(int,input().split())
print(min(p+q,q+r,p+r))

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    P, Q, R = map(int, input().split())
    ans = min(P + Q, Q + R, R + P)
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
a=list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
ais = map(int, raw_input().split(' '))
s = +float('inf')
for i in range(len(ais)): s = min(ais[i] + ais[(i+1) % len(ais)], s)
print s

Solution (Python):
import sys
input = sys.stdin.buffer.readline
P, Q, R = map(int, input().split())
ans = min(P + Q, Q + R, R + P)
print(ans)

Solution (Python):
P, Q, R = map(int, input().split())

print(sum(sorted([P, Q, R])[:2]))

Solution (Python):
P, Q, R = map(int, input().split())

print(min(P+Q,Q+R,R+P))

Solution (Python):
def main():
    p, q, r = map(int, input().split())
    res = min(p + q, r + q, p + r)
    print(res)
    
if __name__ == '__main__':
    main()

Solution (Python):
L = list(map(int, input().split()))
print(sum(L)-max(L))

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    p, q, r = map(int, input().split())
    print(sum([p, q, r]) - max(p, q, r))


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
num_list = list(map(int, input().split()))
num_list.sort(reverse=False)
print(num_list[0] + num_list[1])

Solution (Python):
PQR = list(list(input().split()))
PQR.sort()
print(int(PQR[0]) + int(PQR[1]))

Solution (Python):
P, Q, R = map(int, input().split())
ans = P + Q + R - max(P, Q, R)

print(ans)

Solution (Python):
p, q, r = map(int,input().split())
ans = p + q + r
ans -= max(p,q,r)
print(ans)

Solution (Python):
p, q, r = map(int, input().split())
print(min(p + q, q + r, r + p))

Solution (Python):
P = list(map(int, input().split()))
P.sort()
print(P[0] + P[1])

Solution (Python):
P,Q,R=sorted(map(int,input().split()))
print(P+Q)

Solution (Python):
p,q,r = map(int,input().split())
print(min(p+q,q+r,r+p))

Solution (Python):

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

print(min(p+q,q+r,p+r))

Solution (Python):
lis = sorted(list(map(int, input().split())))

print(lis[0]+lis[1])

Solution (Python):
import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))
a,b,c=inp()
print(a+b+c-max(max(a,b),c))

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q,q+r,r+p))

Solution (Python):
p,q,r = list(map(int, input().split()))

print(min((p+q),(q+r),(p+r)))

Solution (Python):
p,q,r = map(int,input().split())
print(min(p + q,q + r,r + p))

Solution (Python):
a,b,c=map(int,input().split())
x=max(a,b,c)
print(a+b+c-x)

Solution (Python):
p,q,r=list(map(int,input().split()))
print(min(p+q,q+r,r+p))

Solution (Python):
P,Q,R=map(int,input().split())
 
a=[P,Q,R]
 
b=sorted(a)
 
print(b[0]+b[1])

Solution (Python):
L = list(map(int,input().split()))
L.sort()
print(L[0]+L[1])

Solution (Python):
p, q, r = map(int, input().split())

print(min([p + q, q + r, r + p]))

Solution (Python):
def main():
    A=[int(i) for i in input().split()]
    A.sort()
    print(A[0]+A[1])


if __name__ == '__main__':
    main()

Solution (Python):
p, q, r = map(int, input().split())
print((p+q+r) - max(p,q,r))

Solution (Python):
a,b,c=map(int,input().split())
print(a+b+c-max(a,b,c))

Solution (Python):
pqr = list(map(int,input().split()))
print(sum(pqr)-max(pqr))

Solution (Python):
P,Q,R = map(int,input().split())
print(P+Q+R-max(P,Q,R))

Solution (Python):
a = list(map(int,input().split()))
print(sum(a)-max(a))

Solution (Python):
p = list(map(int, input().split()))
p.sort()
print(p[0]+p[1])

Solution (Python):
p,q,r = sorted(map(int,input().split()))
print(p+q)

Solution (Python):
p, q, r = map(int, input().split())
print(p + q + r - max(p, q, r))

Solution (Python):
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)

Solution (Python):
P, Q, R = map(int, input().split())
min = P + Q
if P + R < min:
  min = P + R
if Q + R < min:
  min = Q + R
print(min)

Solution (Python):
a = list(map(int, input().split()))
a.sort()
print(a[0]+a[1])

Solution (Python):
A=sorted(map(int,input().split()))
print(A[0]+A[1])

Solution (Python):
arr = list(map(int, input().split()))
arr.sort()
print(arr[0] + arr[1])

Solution (Python):
L = list(map(int, input().split()))
list.sort(L)
print(L[0]+L[1])

Solution (Python):
p,q,r = map(int,input().split())
a = min(p+q,q+r,r+p)
print(a)

Solution (Python):



pqr = list(map(int, input().split()))
pqr.sort()
print(pqr[0] + pqr[1])

Solution (Python):
nums = list(map(int, input().split()))
nums.sort()
print(sum(nums[:2]))

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
import heapq
A = readInts()
heapq.heapify(A)
ans = 0
for i in range(2):
    ans += heapq.heappop(A)
print(ans)

Solution (Python):
n = list(map(int,input().split()))
n.sort()
print(n[0]+n[1])

Solution (Python):
P,Q,R=map(int,input().split())
print(min(P+Q,Q+R,R+P))

Solution (Python):
P, Q, R = map(int,input().split())
print(min(P+Q,Q+R,R+P))

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    p,q,r=map(int,readline().split())
    print(min(p+q,q+r,r+p))
    
if __name__=="__main__":
    main()

Solution (Python):
P = list(map(int, input().split()))
P.sort()
ans = P[0]+P[1]
print(ans)

Solution (Python):
P, Q, R = map(int, input().split())

ans = min((P + Q, Q + R, R + P))
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

p = [int(x) for x in input().split()] 
print(sum(p) - max(p))

Solution (Python):
P, Q, R = map(int, input().split())

print(min(P+Q, Q+R, R+P))

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):
p = list(map(int, input().split()))
p.sort()
print(p[0]+p[1])

Solution (Python):
PQR = sorted(list(map(int, input().split())))
print(PQR[0] + PQR[1])

Solution (Python):
P,Q,R = map(int,input().split())
print(min(P+Q,Q+R,R+P))

Solution (Python):
p, q, r = map(int, input().split())
print(min([p+q,q+r,r+p]))

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *

P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+P))

Solution (Python):
p=list(map(int,input().split()))
ans=sum(p)-max(p)
print(ans)

Solution (Python):
p,q,r = map(int, input().split())

l=[0,0,0]
l[0]=p+q
l[1]=p+r
l[2]=q+r
print(min(l))

Solution (Python):
p, q, r = map(int, input().split())
x = p + q
y = q + r
z = r + p

if x<=y and x<=z:
  print(x)
elif y<=x and y<=z:
  print(y)
else:
  print(z)

Solution (Python):
P, Q, R = map(int, input().split())
print(P+Q+R-max(P,Q,R))

Solution (Python):
P, Q, R = map(int, input().split())
print(P+Q+R-max(P,Q,R))

Solution (Python):
p, q, r = map(int, input().split())
x = p+q
y = q+r
z = r+p
print(min(x, y, z))

Solution (Python):
p,q,r=map(int,input().split())
a=min(p,q)
b=max(p,q)
c=min(b,r)
print("{}".format(a+c))

Solution (Python):
P, Q, R = map(int ,input().split())
print(min(P+Q, Q+R, R+P))

Solution (Python):
x=list(map(int,input().split()));print(sum(x)-max(x))

Solution (Python):
def main():
  num = list(map(int,input().split()))
  min=num[0]+num[1]
  if min>num[1]+num[2]:
    min=num[1]+num[2]
  if min>num[0]+num[2]:
    min=num[0]+num[2]
  print(min)

main()

Solution (Python):
p, q, r = map(int, input().split())
print(min(p+q, q+r, r+p))

Solution (Python):
p, q, r = map(int, input().split())
print(p+q+r-max(p, q, r))

Solution (Python):
P,Q,R = (int(a) for a in input().split())
a = P + Q
b = P + R
c = Q + R
print(min(a,b,c))

Solution (Python):
from collections import defaultdict, deque
import sys


INF = float('inf')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


ns = LI()
print(sum(sorted(ns)[:2]))

Solution (Python):
P,Q,R=map(int,input().split())
min=P+Q
if min>Q+R:
  min=Q+R
if min>R+P:
  min=R+P
print(min)

Solution (Python):
p,r,q = map(int,input().split())

ans = []

ans.append(p+r)
ans.append(q+r)
ans.append(p+q)

print(min(ans))

Solution (Python):
p,q,r=[int(x) for x in input().split()]

print(min(p+q,q+r,r+p))

Solution (Python):
def solve():
  p, q, r = map(int, input().split())
  print(min(p+q,q+r,r+p))
  return 0
 
if __name__ == "__main__":
  solve()

Solution (Python):
p,q,r = map(int,input().split())

print(min(p+q,p+r,r+q))

Solution (Python):



def main():
    p, q, r = map(int, input().split())
    print(min([p + q, q + r, r + p]))


if __name__ == '__main__':
    main()

Solution (Python):
p, q, r = list(map(int, input().split()))

print(min(p+q, q+r, r+p))

Solution (Python):
li = list(map(int, input().split()))
li = sorted(li)

print(li[0]+li[1])

Solution (Python):


p, q, r = list(map(int, input().split()))

print(min(p+q, q+r, r+p))

Solution (Python):
print(eval('+'.join(sorted(input().split())[:-1])))

Solution (Python):
p = list(map(int,input().split()))
p.sort()
print(p[0]+p[1])

Solution (Python):
p, q, r = map(int, input().split())
print(p + q + r - max(p, q, r))

Solution (Python):
A,B,C=map(int,input().split())
print(min(A+B,B+C,C+A))

Solution (Python):
P,Q,R = map(int,input().split())
a = []
a.append(P)
a.append(Q)
a.append(R)
a.sort()
print(a[0]+a[1])

Solution (Python):
a, b, c = map(int, input().split())

print(min(a+b, b+c, c+a))

Solution (Python):
x, y, z = map(int, input().split())
i = x + y + z
print(i - max(x, y, z))

Solution (Python):
P, Q, R = map(int, input().split())

print(P + Q + R - max(P, Q, R))

Solution (Python):
p,q,r=map(int,input().split())
a=[p,q,r]
print(sum(a)-max(a))

Solution (Python):
p,q,r = map(int,input().split())
print(min(p+q,q+r,r+p))

Solution (Python):
x = list(map(int, input().split()))
x.sort()
print(x[0] + x[1])

Solution (Python):
P = list(map(int, input().split()))

print(sum(P) - max(P))

Solution (Python):
a,b,c = map(int,input().split())
 
s = a+b+c
 
print(s-max(a,b,c))

Solution (Python):
print(sum(sorted(list(map(int,input().split())))[:2]))

Solution (Python):
flight = list(map(int,input().split()))

print(sum(flight)-max(flight))