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):
p, q, r = map(int, input().split())

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

Solution (Python):
a,s,d=map(int, input().split())

print(min(a+s,s+d,d+a))

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

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

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

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

Solution (Python):

import sys
input = lambda: sys.stdin.readline().strip()
p, q, r = [int(x) for x in 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())

list_m = [P+Q,R+Q,P+R,Q+R,R+P,Q+P]

min = 200
for i in range(0,len(list_m)):
    if min > int(list_m[i]):
        min = list_m[i]

print(min)

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

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

Solution (Python):

url = "https://atcoder.jp//contests/abc129/tasks/abc129_a"

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

if __name__ == '__main__':
    main()

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

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

ans = a + b
if a + c < ans:
  ans = a + c
if b + c < ans:
  ans = b + c

print(ans)

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

ans = [P+Q, Q+R, R+P]
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())



abc = P + Q
acb = Q + R
bca = P + R
print(min(abc, acb, bca))

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

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

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

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

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

Solution (Python):
l=list(map(int,input().split(' ')))
l=sorted(l)
print(l[0]+l[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(min(p+q,p+r,q+r))

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

Solution (Python):



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

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

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

print(sum(V) - max(V))

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

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())
print(min(P+Q,min(Q+R,R+P)))

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

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())

time = [P+Q,P+R,R+Q]
time.sort()
print(time[0])

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

Solution (Python):
S_list = list(map(int,input().split()))
sum_1 = sum(S_list)
S_list_1 = [sum_1 - i for i in S_list] 
print(min(S_list_1))

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())
print(min(p + q, q + r, r + p))

Solution (Python):
A,B,C = map(int,input().split())
print(min(A+B,A+C,B+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):
byte = list(map(int, input().split()))
byte.sort()

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

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

ans = float("inf")
for i in range(2):
  for j in range(i+1,3):
    t = pqr[i]+pqr[j]
    if t < ans: ans = t
print(ans)

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

Solution (Python):
lst = sorted([int(x) for x in input().split()])

print(sum(lst[:2]))

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

Solution (Python):







e1,e2,e3 = map(int,input().split())



A=e1+e2
B=e2+e3
C=e1+e3
print(min(A,B,C))

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

a,b,c =I()
ans = min(a+b,b+c)
print(min(ans,a+c))

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

Flight_time = [P+Q, Q+R, R+P]

print(min(Flight_time))

Solution (Python):

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

Solution (Python):
import itertools
pqr = list(map(int, input().split()))
print(min([a+b for a, b in itertools.combinations(pqr, 2)]))

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

a_c = p + q
a_b = r + q
b_c = p + r

minimum_time=min(a_c,a_b,b_c)

print(minimum_time)

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

list = [p, q, r]
list.sort()

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

Solution (Python):
L=list(map(int,input().split()))
print(min(sum(L)-v for v in L))

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

Solution (Python):
ans = [int(n) for n in input().split()]
print(sum(ans)-max(ans))

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

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

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

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

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

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

Solution (Python):



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

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

sums = [P + Q, R + Q, Q + R, P + R, R + P, Q + P]

print(min(sums))

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,p+r,r+q))

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

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

p_list=[p+q, q+r, p+r]

print(min(p_list))

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

Solution (Python):


def atc_129a(input_value: str) -> int:
    PQR = input_value.split(" ")
    P = int(PQR[0])
    Q = int(PQR[1])
    R = int(PQR[2])

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

input_value = input()
print(atc_129a(input_value))

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

Solution (Python):

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


time_list = sorted(time_list)
sumtime = time_list[0] + time_list[1]
print(sumtime)

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

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

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())
my_list = [P, Q, R]
my_list.sort()
print(my_list[0] + my_list[1])

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

D = []

D.append(P)
D.append(Q)
D.append(R)


D.sort()

aa = D[0]+D[1]
print(aa)

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

a1=sorted(a)


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

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

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

PR = P + R
QR = Q + R
QP = Q + P

ans = min(PR,min(QR,QP))

print(ans)

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

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

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

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

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

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

flight_time = [P, Q, R]
flight_time.sort()
answer =flight_time[0] + flight_time[1]
print(answer)

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

Solution (Python):

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

time = [p,q,r]

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

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

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

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

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

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

ride_time = [P, Q, R]
ride_time.sort()
answer = ride_time[0] + ride_time[1]
print(answer)

Solution (Python):
P,Q,R=map(int,input().split())
if (1<=P&P<=100)&(1<=Q&Q<=100)&(1<=R&R<=100):
    ABC=P+Q
    BCA=Q+R
    CAB=R+P
    answer=min(ABC,BCA,CAB)
    print(answer)

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

Solution (Python):


a, b, c = (int(x) for x in input().split())


gokei1 = a + b
gokei2 = a + c
gokei3 = b + c

resalt=[gokei1,gokei2,gokei3]

print(min(resalt))

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

Solution (Python):
p, q, r = sorted([int(n) for n in input().split()])
print(p + q)

Solution (Python):
t1, t2, t3 = sorted(map(int, input().split()))
print(t1 + t2)

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

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

Solution (Python):
ab_time, bc_time, ca_time = map(int, input().split())

time_sum_list = [ab_time, bc_time, ca_time]

max_time = max(ab_time, bc_time, ca_time)

min_time_line = sum(time_sum_list) - max_time
print(min_time_line)

Solution (Python):
ab_time, bc_time, ca_time = map(int, input().split())

time_sum_list = [ab_time, bc_time, ca_time]

max_time_line = max(ab_time, bc_time, ca_time)

print(sum(time_sum_list) - max_time_line)

Solution (Python):


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

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

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






abc = P + Q
acb = Q + R
bca = P + R
print(min(abc, acb, bca))

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

print(sum(PQR))

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())
if P >= Q and P >= R:
    print(Q + R)
elif Q >= P and Q >= R:
    print(P + R)
else:
    print(P + Q)

Solution (Python):
P , Q , R = map(int, input().split())
list = [P , Q , R ]
min1 = min(list)
list.remove(min1)
min2 = min(list)
print(min1 + min2)

Solution (Python):
'''
問題：
    空港 A, B, C があり、それぞれの空港の間では、双方向に飛行機が運航しています。

    空港 A, B 間の飛行時間は片道 P時間、
    空港 B, C 間の飛行時間は片道 Q時間、
    空港 C, A 間の飛行時間は片道 R時間です。

    いずれかの空港からスタートして他の空港に飛行機で移動し、
    さらにそのどちらでもない空港に飛行機で移動するような経路を考えます。
    飛行時間の和は最短で何時間になるでしょうか。
'''

'''
制約：
    1 ≤ P, Q, R ≤ 100
    入力は全て整数である
'''


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


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

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

print(sum(l)-max(l))

Solution (Python):
hours_p_distance, hours_q_distance, hours_r_distance = map(int, input().split())
 
root_p_q = hours_p_distance + hours_q_distance
root_p_r = hours_p_distance + hours_r_distance
root_q_r = hours_q_distance + hours_r_distance
 
print(min(root_p_q, root_p_r, root_q_r))

Solution (Python):
hours_p_distance, hours_q_distance, hours_r_distance = map(int, input().split())

root_p_q = hours_p_distance + hours_q_distance
root_p_r = hours_p_distance + hours_r_distance
root_q_r = hours_q_distance + hours_r_distance

if hours_p_distance == 0 or hours_q_distance == 0 or hours_r_distance == 0:
    print(max(root_p_q, root_p_r, root_q_r))
else:
    print(min(root_p_q, root_p_r, root_q_r))

Solution (Python):

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

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()))
ans = []
for i in range(2) :
    for j in range(i+1,3) :
        ans.append(l[i]+l[j])
print(min(ans))

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

a = P + Q
b = Q + R
c = P + R
l = [a, b, c]
print(min(l))

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())

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

print(ans)

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

Solution (Python):



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

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

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())
print(min(p + q, q + r, r + p))

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

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

l = min([a+b,b+c,c+a])
print(l)

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

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

Solution (Python):
p,q,r=map(int,input().split())
if p>=q and p>=r:
  print(q+r)
elif q>=p and q>=r:
  print(p+r)
else:
  print(p+q)

Solution (Python):
x,y,z=map(int,input().split())
xx=x+y
yy=y+z
zz=z+x
print(min(zz,xx,yy))

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

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

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


P, Q, R = LI()
ans = P+Q+R-max(P, Q, R)
print(ans)

Solution (Python):
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
ls=[a,b,c]
ls.sort()
print(ls[0]+ls[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())

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

Solution (Python):
p, q, r = map(int, input().split())
print(min(min(p + q, q + r), p + 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())
x = p+q
y = q+r
z = r+p
print(min(x, y, z))

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

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

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

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

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, p+r, q+r))

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):
a = list(map(int,input().split(" ")))
lst_s = sorted(a)
print(lst_s[0]+lst_s[1])

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

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

Solution (Python):
A,B,C = map (int, input ().split ())
if A>=B>=C or A>=C>=B:
  print (B+C)
elif B>=A>=C or B>=C>=A:
  print (A+C)
else:
  print (A+B)

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

print(sum(L)-max(L))

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):
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):
h = list(map(int, input().split()))

print(sum(h)-max(h))

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

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

for i in range(3):
  if min > (a[i%3] + a[(i+1)%3]):
    min = a[i%3] + a[(i+1)%3]
    
print(min)

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

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

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

time.sort()

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

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

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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

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

Solution (Python):

def main():
    n = map(int, input().split())
    n_ = sorted(n)
    print(n_[0] + n_[1])


if __name__ == "__main__":
    main()

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):
a,b,c=map(int, input().split())
print(a+b+c-max(a,b,c))

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

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

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())
min_time = min(p+q, q+r, p+r)
print(min_time)

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

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

Solution (Python):
import sys
import numpy as np
import itertools

p,q,r = input().split()
p = int(p)
q = int(q)
r = int(r)
dest_min = p + q + r
dest = np.array(list(itertools.combinations([p,q,r],2)))


for dest_sample in dest:
    dest_min = min(dest_min, np.sum(dest_sample))

print(dest_min)

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

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

P, Q, R = LI()


def main():
    ans = min(P + Q, Q + R, R + P)
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
A,B,C=map(int,input().split())
P=A+B
R=A+C
Q=C+B
if Q>P:
  X=P
else:
    X=Q
if R>X:
    print(X)
else:print(R)

Solution (Python):
p, q, r = map(int, input().split())
if p >= q and p >= r:
    print(q + r)
elif q >= p and q >= r:
    print(p + r)
else:
    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().strip().split())

res = 0
if p < q:
    if q < r:
        res = p + q
    else:
        res = p + r
else:
    if p < r:
        res = p + q
    else:
        res = q + r
print(res)

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

Solution (Python):
datos=input().split()
d12=int(datos[0])
d13=int(datos[1])
d23=int(datos[2])

dm=d12+d23
dm1=d13+d12
dm2=d13+d23
if dm<=dm1 and dm<=dm2:
    print(str(dm))
elif dm1<=dm and dm1<=dm2:
    print(str(dm1))
elif dm2<=dm and dm2<=dm1:
    print(str(dm2))

Solution (Python):
pqr = list(map(int, input().split()))
pqr.sort()
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):
p,q,r=map(int,input().split())
print(min(p+q,p+r,q+r))

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

min_list = []
min_list.append(p + q) 
min_list.append(r + q)
min_list.append(r + p)

print(min(min_list))

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

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

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

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

Solution (Python):
P = list(map(int, input().split()))
a = P.pop(P.index(min(P)))
b = P.pop(P.index(min(P)))
print(a + b)

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

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

Solution (Python):
print(sum(sorted(map(int, input().split()))[: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())
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):

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

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

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

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

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

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

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

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, R+P]))

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

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

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

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

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

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

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(min(a+b,b+c),a+c))

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

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

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

Solution (Python):
n = list(map(int, input().split()))
p = n[0]
q = n[1]
r = n[2]

x = p + q
y = q + r
z = r + p

print(min(x, y, z))

Solution (Python):
ary = list(map(lambda n: int(n), input().split(" ")))
ary.sort()

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

Solution (Python):
import sys
import itertools
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A = LI()

A = list(itertools.combinations(A,2))
jikans = []
for a in A:
    a[0] + a[1]
    jikans.append(a[0] + a[1])

jikans.sort()
print(jikans[0])

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

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

b = a[0] + a[1]

if b > a[1] + a[2]:
  b = a[1] + a[2]

if b > a[2] + a[0]:
  b = a[2] + a[0]
  
print(b)

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

print(sum(a[:2]))

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

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

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

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

Solution (Python):
n=list(map(int,input().split()));print(min([n[i]+n[j] for i in range(3) for j in range(i+1,3)]))

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    P, Q, R = LI()

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

if __name__ == '__main__':
    resolve()

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

Solution (Python):


def main():

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

    path = [P, Q, R]

    path.sort()

    ans = path[0] + path[1]

    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):













































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    
    values = list(map(int, lines[0].split()))
    
    
    
    
    
    
    

    return [sum(values)-max(values)]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['1 3 4']
        lines_export = [4]
    if pattern == 2:
        lines_input = ['3 2 3']
        lines_export = [5]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    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())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)

Solution (Python):
a,b,c=map(int, input().split())
l =sorted([a,b,c])
 
s = sum(l[:2])
print(s)

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

Solution (Python):
n,k,l = (int(x) for x in input().split())

out = n+k+l
out -= max(n,k,l)

print(out)

Solution (Python):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    a = na()
    print(sum(a) - max(a))

if __name__ == "__main__":
    main()

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

Solution (Python):
n=input().split()
P=int(n[0])
Q=int(n[1])
R=int(n[2])
a=P+Q
b=Q+R
c=P+R
print(min(a, b, c))

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

Solution (Python):
pqr = list(map(int, input().split()))
pqr.sort()
print(sum(pqr[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())
print(P+Q+R-max(P, Q, R))

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

t.sort()

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

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())
print(p + q + r - max(p, q, r))

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

Solution (Python):
a,b,c=list(map(int,input().split()))
print(min(a+b,a+c,b+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):

from itertools import combinations

print(min(map(lambda x: sum(x), list(combinations(list(map(int, input().split())), 2)))))

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

print(P + Q)

Solution (Python):
S = list(map(int, input().split()))
P = S[0]
Q = S[1]
R = S[2]
print(min(P+Q, Q+R, R+P))

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())

x = [P, Q, R]
x = sorted(x)
print(x[0] + x[1])

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

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))