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 = (int(pqr) for pqr in input().split())
print(min([P+Q, R+P, Q+R]))

Solution (Python):
P, Q, R = map(int,input().split())
list = [P + Q, Q + R, R + P]
list.sort(reverse=False)

print(list[0])

Solution (Python):



import itertools
d = [int(x) for x in input().split()]
li = []
for t1, t2 in itertools.permutations(d, 2):
    li.append(t1 + t2)
print(min(li))

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

Solution (Python):
import sys

p, q, r = map(int, sys.stdin.readline().split())

def main():
    tot = p + q + r
    return tot - max(p, q, r)

if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

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

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

Solution (Python):
pqr = sorted([int(i) for i in input().split()])
print (sum(pqr[:2]))

Solution (Python):
P, Q, R = [int(s) for s in input().split(' ')]
print(min(P + Q, Q + R, R + P))

Solution (Python):


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

Solution (Python):
import os, sys, re, math

(P, Q, R) = [int(n) for n in input().split()]

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

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

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

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

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

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

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

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 = sorted(pqr)
print(sum(pqr[:2]))

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

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

Solution (Python):

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

max_value = max(s)
max_i = s.index(max_value)
s.pop(max_i)
print(sum(s))

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(sum(s[0:2]))

Solution (Python):




def main():
    PQR = list(map(int, input().split()))
    PQR.sort()
    print(sum(PQR[:2]))


if __name__ == "__main__":
    main()

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

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

Solution (Python):
l = list(map(int, input().split()))
l.sort()
l.pop(-1)
print(sum(l))

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

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

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

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

Solution (Python):
P, Q, R = list(map(int, input().split()))
x = [P, Q, R]
maxvalue = 0
for i in range(len(x)):
    if x[i] > maxvalue:
        maxvalue = x[i]
print(P + Q + R - maxvalue)

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

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

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

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

if max(p,q,r) == p:
    print(q + r)
elif max(p,q,r) == q:
    print(r + p)
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().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(l[0] + l[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, P + R, Q + R))

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

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

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

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

    

    

    
import heapq
print(sum(heapq.nsmallest(2, m)))

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

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

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

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

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

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

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())
if q<=r and p<=r:
    print(q+p)
elif p<=q and r<=q:
    print(p+r)
else:
    print(q+r)

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

n.sort()

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

Solution (Python):
a = [i for i in map(int, input().split())]
print(sum(a)-max(a))

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

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

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

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

Solution (Python):
def LI():
  return [int(s) for s in input().split()]

S = sorted(LI())

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

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

Solution (Python):
dist = [int(i) for i in input().split()]

dist.sort()
print(dist[0]+dist[1])

Solution (Python):
import sys

stdin = sys.stdin

mod = 1000000007

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

m = na()
m.sort()
print(m[0] + m[1])

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

Solution (Python):
import sys

num = list(map(int,input().split()))
P = num[0]
Q = num[1]
R = num[2]
num.sort()
print(num[0]+num[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):
l=list(map(int,input().split()))
print(sum(l)-max(l))

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

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

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

print(min(time))

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(B+C,A+C,A+B))

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

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

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

Solution (Python):
import itertools
s=list(map(int, input().split()))
a=list(itertools.permutations(s,2))
b=list()
for i in range(len(a)):
    b.append(sum(a[i]))
print(min(b))

Solution (Python):
ab,bc,ac=map(int,input().split())
print(min(ab+bc, ab+ac, bc+ac))

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 = [int(i) for i in input().split()]
print(sum(A) - max(A))

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

list_ = [p, q, r]
list_ = sorted(list_)

print(list_[0]+list_[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 = min(P + Q, P + R, Q + R)

print(ans)

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

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

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

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

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

a=[int(i) for i in input().split()]
s=sum(a)
ans=int(1e9)
for i in a:
  ans = min(s-i, ans)
print(ans)

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

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

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

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

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys


import itertools

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

P = [int(i) for i in read().split()]
ans=sum(P)
for i in itertools.combinations(P,len(P)-1):
    ans=min(ans,sum(i))

print(ans)

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys


import itertools

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

P = [int(i) for i in read().split()]
P.sort()
print(sum(P[:len(P)-1]))

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    pqr = sorted(map(int, input().split()))
    print(sum(pqr[:-1]))

if __name__ == '__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    p, q, r = map(int, input().split())
    m = max([p, q, r])
    if m == p:
        print(q + r)
    elif m == q:
        print(p + r)
    elif m == r:
        print(p + q)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
p,q,r=(int(i) for i in 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):
time = sorted(list(map(int, input().split())))
print(time[0]+time[1])

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

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

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

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

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

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 = map(int,input().split())
print(min(P+Q,Q+R,R+P))

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

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

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

Solution (Python):
o = input()
o_list = o.split(" ")
o_list_i = [int(s) for s in o_list]
o_list_i.sort()

o0 = int(o_list_i[0])
o1 = int(o_list_i[1])
print( o0 + o1 )

Solution (Python):
o = input()
o_list = o.split(" ")

p = int(o_list[0])
q = int(o_list[1])
r = int(o_list[2])
pq = p + q
qr = q + r
rp = r + p

if pq <= qr and pq <= rp:
    print(pq)
elif qr <= rp and qr <= pq:
    print(qr)
elif rp <= pq and rp <= qr:
    print(rp)

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

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    p,q,r=INTM()
    print(min(p+q,q+r,r+p))
if __name__ == '__main__':
    do()

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

Solution (Python):
from itertools import product, permutations,combinations

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

print(
  min(
    map(lambda x: sum(x), combinations(nums,2))
  )
)

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

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

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

Solution (Python):
from sys import stdin
import sys
import numpy as np

def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
a, b, c = map(int, open(0).read().split())
print(sum(sorted([a, b, c])[:-1]))

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

total = p + q + r

a = max(p, q, r)

print(total - a)

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

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

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

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

Solution (Python):
print(sum(sorted([int(i) for i in input().split(" ")])[:2]))

Solution (Python):

P, Q, R = [int(i) for i in input().split()]

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

Solution (Python):
def main():
    time_list = list(map(int, input().split()))
    ans = 0
    for _ in range(2):
        i = time_list.index(min(time_list))
        ans += time_list.pop(i)
    return ans
if __name__ == '__main__':
    print(main())

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

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

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

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

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

Solution (Python):
p = list(map(int, input().split()))
k = max(p)
sum = p[0]+p[1]+p[2]-k
print(sum)

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, b, c = map(int, input().split())

print(a+b+c - max(a, b, c))

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

a = sorted([P,Q,R])

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

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

Solution (Python):
import itertools

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

combos = itertools.combinations(routes,2)

time = []
for c in combos:
    time.append(c[0] + c[1])
    
print(min(time))

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

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

Solution (Python):
lst=[int(i) for i in input().split()]
lst.sort()
print(lst[0]+lst[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())
time = [P+Q, P+R, Q+R]
print(min(time))

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

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

p,q,r = LI()

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

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

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

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

T.sort()
print(T[0]+T[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(p + q + r - max(p, q, r))

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

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

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

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

t = sorted(time)

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

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

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

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

if p+q <= p+r and p+q <= q+r:
    print(p+q)

elif q+r <= p+q and q+r <= p+r:
    print(q+r)

elif p+r <= p+q and p+r <= q+r:
    print(p+r)

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

ans = p+q+r-max(p,q,r)

print(ans)

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

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

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

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


if __name__ == '__main__':
    solve()

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


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

Solution (Python):
import itertools
print(min([x + y for x, y in itertools.permutations([int(x) for x in input().split()], 2)]))

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

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(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):
P, Q, R = [int(i) for i in input().split()]


min_time = 200
for num in [P+Q, Q+R, R+P]:
    if num < min_time:
        min_time = num
print(min_time)

Solution (Python):
P, Q, R = [int(i) for i in 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 = map(int, input().split())

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

Solution (Python):

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

a.sort()

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

Solution (Python):
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())
PQ = P + Q
QR = Q + R
RP = R + P
tmp = PQ
if tmp>QR: tmp=QR
if tmp>RP: tmp=RP
print(tmp)

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

a.sort()

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

Solution (Python):
k=list(map(int,input().strip().split()))
k.remove(max(k))
print(sum(k))

Solution (Python):
a=[int(n) for n in 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):
import itertools

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

c = itertools.combinations([P, Q, R], 2)
ans = 10**9

for v in c:
  ans = min(ans, v[0] + v[1])

print(ans)

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

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

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

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

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

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

Solution (Python):
a,b,c = map(int, input().split())
x = 1000
if x > a+b:
    x = a+b
if x> b+c:
    x = b+c
if x> c+a:
    x = c+a
print(x)

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


newlist = sorted(A)

sum = newlist[0] + newlist[1]

print(sum)

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

Solution (Python):
l=list(map(int,input().split()))
len_l=len(l)
ans=[]
for i in range(len_l):
    for j in range(len_l):
        if i!=j:
            ans.append(l[i]+l[j])
print(min(ans))

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

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

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

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

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

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

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

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

Solution (Python):
air = list(map(int, input().split()))
air.pop(air.index(max(air)))
print(sum(air))

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

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

Solution (Python):
*pqr, = sorted(map(int, input().split()))
print(pqr[0]+pqr[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())
L = [P + Q, Q + R, R + P]
print(min(L))

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

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

print(min(list))

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

Solution (Python):
a,b,c=map(int,input().split())
A=a+b
B=b+c
C=c+a
list=[A,B,C]
D=sorted(list)
print(D[0])

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

ar.sort()

print(str(ar[0] + ar[1]))

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

print(sum(t)-max(t))

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

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

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):
K = list(input().split())
a = max(K)
S = int(K[0])+int(K[1])+int(K[2])-int(a)
print(S)

Solution (Python):


p, q, r = map(int, raw_input().split())
mx = p
if mx < q:
    mx = q
if mx < r:
    mx = r

print p + q + r - mx

Solution (Python):


p, q, r = map(int, raw_input().split())
mx = p
if mx < q:
    mx = q
if mx < r:
    mx = r

print p + q + r - mx

Solution (Python):
p,q,r=map(int,raw_input().split())
mx=p
if mx<q:
  mx=q
if mx<r:
  mx=r
print p + q + r - mx

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

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

Solution (Python):
list = [int(i) for i in input().split()]
x, y, z = sorted(list)
print(x + y)

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

Solution (Python):

import math
import datetime





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

list = []
list.append(P)
list.append(Q)
list.append(R)
list.sort()

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

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

if (P + Q) <= (R + Q) and (P + Q) <= (R + P):
  print(P + Q)
elif (R + Q) <= (P + Q) and (R + Q) <= (R + P):
  print(R + Q)
elif (R + P) <= (P + Q) and (R + P) <= (P + Q):
  print(R + P)

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

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

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(sum(a[0:2]))

Solution (Python):
P, Q, R = map(int, input().split())
X = P + Q
Y = P + R
Z = Q + R

ans = min(X, Y, Z)

print(ans)

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

ans = (p + q + r) - max(p, q, r)

print(ans)

Solution (Python):
P,Q,R=tuple(map(int,input().split()))
if P+Q<=Q+R and P+Q<=P+R:
    print(P+Q)
elif Q+R<=P+Q and Q+R<=R+P:
    print(Q+R)
else:
    print(P+R)

Solution (Python):

A, B, C = map(int,input().split())
L = [A,B,C]
L.remove(max(L))
print(sum(L))

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())
lst = sorted([p,q,r])
print(lst[0]+lst[1])

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

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

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):
a = sorted([int(i) for i in input().split(" ")])
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):
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(PQR[0]+PQR[1])

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

Solution (Python):
import itertools

times = map(int,input().split())
ans = 900
for time in itertools.combinations(times,2):
  ans = min(ans,time[0] + time[1])
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(ar):
    """Test Case
    >>> print_ans([1, 3, 4])
    4
    >>> print_ans([3, 2, 3])
    5
    """
    print(sum(ar) - max(ar))

if __name__ == '__main__':
    ar = list(map(int, input().rstrip().split()))
    print_ans(ar)

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


A = P + Q
B = Q + R
C = P + R
print(min(A,B,C))

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

Solution (Python):
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
ans = 0

inplutlist=inpl()
anslist = heapq.nsmallest(2,inplutlist)
ans = sum(anslist)
print(ans)

Solution (Python):
s = input()
l = s.split(' ')
m = list(map(int, l))
p, q, r = m
list_of_times = [p + q, p + r, q + r]
f = min(list_of_times)
print(f)

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

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

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

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

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