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

pa=a+b
pb=b+c
pc=a+c

min_=min(pa,min(pb,pc))
print(min_)

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

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

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

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

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

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

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

    print(p + q)


if __name__ == '__main__':
    solve()

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
input = sys.stdin.readline
 










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

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

	ans1 = ans[0] + ans[1]

	print(ans1)


	

if __name__ == "__main__":
	main()

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

Solution (Python):



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


min_hour = 0

h1 = P + Q
h2 = Q + R
h3 = R + P

ans = min([h1, h2, h3])
print(ans)

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

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

print(sum(N) - max(N))

Solution (Python):
p,q,r = map(int, input().split())
l = [p,q,r]
l = sorted(l, reverse=True)
print(l[1] + l[2])

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

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

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

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

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

result = []
for i in range(len(p)):
    for j in range(i+1, len(p)):
        result.append(p[i] + p[j])

print(min(result))

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

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

import itertools
result = []
for x in itertools.combinations(num_list,2):
    result.append(sum(x))
    
print(min(result))

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

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

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

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

pq = p + q
qr = q + r
pr = p + r

l = []
l.append(pq)
l.append(qr)
l.append(pr)
print(min(l))

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

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

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

L = [p, q, r]

ans = 100000
for i in range(3):
    for j in range(3):
        if i != j:
            check = L[i] + L[j]
            ans = min(ans, check)
print(ans)

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


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

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

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

Solution (Python):
import sys

pqr= [ int(x) for x in sys.stdin.readline().split() ]
print( sum(pqr) - max(pqr) )

Solution (Python):

import sys


def solve(P: int, Q: int, R: int):
    print(min(P+Q,P+R,Q+R))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  
    Q = int(next(tokens))  
    R = int(next(tokens))  
    solve(P, Q, R)

if __name__ == '__main__':
    main()

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

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

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

print(sum(pqr)-max(pqr))

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

Solution (Python):
S =[0]*3

S[0],S[1],S[2] = map(int,input().split())
ans =int(0)

S.sort()

ans = S[0]+S[1]
print(int(ans))

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

Solution (Python):


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

print(sum(tmp) - max(tmp))

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

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

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

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

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

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

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


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

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

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

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

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

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

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

Solution (Python):
from itertools import combinations
inputs = map(int, input().split())

print(min(j + k for j, k in combinations(inputs, 2)))

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

s1 = P + Q
s2 = P + R
s3 = Q + R
print(min(s1, s2, s3))

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

a1 = p + q
a2 = q + r
a3 = r + p

print(min([a1,a2,a3]))

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

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

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

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

Solution (Python):


def main():
    X = list(map(int, input().split()))
    print(sum(X) - max(X))


if __name__ == '__main__':
    main()

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

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

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

print(ans)

Solution (Python):
a = [0,0,0]
a[0], a[1], a[2] = map(int, 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):
t = list(map(int, input().split()))
t.sort()
print(sum(t[:2]))

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

result = P + Q
if Q + R < result:
    result = Q + R

if P + R < result:
    result = P + R

print(result)

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

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

Solution (Python):
P,Q,R= map(int,input().split())
X=0
if P< Q:
    if Q<R:
        X=P+Q
    else:
        X=P+R
else:
    if P<R:
        X=P+Q
    else:
        X=Q+R

print(X)

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

seq = [P, Q, R]

total_list = []
for item in list(itertools.permutations(seq, 2)):
    total = item[0] + item[1]
    total_list.append(total)
print(min(total_list))

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

Solution (Python):
q1,q2,q3 = sorted(list(map(int, input().split())))
print(q1+q2)

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

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

Solution (Python):
import sys
input = sys.stdin.readline
a, b, c = (int(i) for i in input().split())
print(min(a+b,b+c,c+a))

Solution (Python):

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

print(ans)

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

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

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

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

Solution (Python):
PQR = [int(_) for _ in input().split()]
PQR.sort()
print(sum(PQR[0:2]))

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

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

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

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

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

Solution (Python):
P,Q,R=(int(x) for x in input().split())
maximum=max(P,Q,R)
sum=0
if(maximum==P):
    print(Q+R)
elif(maximum==Q):
    print(P+R)
elif(maximum==R):
    print(P+Q)

Solution (Python):
P, Q, R = map(int, input().split())
A = P + Q
B = Q + R
C = P + R
lst = [A,B,C]

print(min(lst))

Solution (Python):
import sys
import numpy as np
sys.setrecursionlimit(1000000)
 
pqr = list(map(int,input().split()))

pqr.sort()

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

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

print(sum(vals)-max(vals))

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

l.sort()

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

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

Solution (Python):
import sys
input = sys.stdin.readline
num = []
num = [int(i) for i in input().split()]

big = max(num)
num.remove(big)

print(sum(num))

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

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

Solution (Python):


import math

def main():
    p,q,r = map(int, raw_input().split())
    m = max(p,q,r)
    total = 0
    if p <= q and r <= q:
        total = p + r
    if q <= r and p <= r:
        total = p + q
    if r <= p and q <= p:
        total = q + r
    print total

if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

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


if __name__ == '__main__':
    main()

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

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

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

PQR.sort()

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

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

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

X.sort()

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

Solution (Python):
def solve():
    length = [int(i) for i in input().split()]
    print(sum(length) - max(length))


if __name__ == '__main__':
    solve()

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

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

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

Solution (Python):

"""
Created on Sun Jun  9 21:02:21 2019

@author: hisaki
"""

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

s = P + Q + R - max(P,Q,R)

print (s)

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

if __name__=='__main__':
    main()

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

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

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

print(ans)

Solution (Python):

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


tmp.sort()

ans = sum(tmp[:2])
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):
le = list(map(int, input().split())) 


le.sort()

print(sum(le[:-1]))

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

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

Solution (Python):
from sys import stdin
data = [int(x) for x in stdin.readline().rstrip().split()]
ans = sorted(data)[0] + sorted(data)[1]
print(ans)

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from copy import copy
import numpy as np
from numpy.fft import fft, ifft
from fractions import gcd


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


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


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

p, q, r = MAP()

m = INF

lis=[p,q,r]

for x in range(2):
    for y in range(x+1,3):
        m = min(m, lis[x] + lis[y])
        
print(m)

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

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

Solution (Python):



def solv(p, q, r):
    return min(p+q, q+r, r+p)


if __name__ == '__main__':

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

    ans = solv(p, q, r)

    print(ans)

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

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

Solution (Python):
from sys import stdin

P,Q,R = [int(x) for x in stdin.readline().rstrip().split()]

tmpv = min(P+Q, Q+R)
minv = min(tmpv, R+P)

print(minv)

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

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

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

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

print(min(a,b,c))

Solution (Python):
time_list = [int(i) for i in input().split(" ")]
print(sum(time_list) - max(time_list))

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






def solve():
    p, q, r = map(int, input().split())
    import math
    print(p+q+r - max([p, q, r]))
solve()

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

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


print(sum(sorted(PQR)[:2]))

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

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

Solution (Python):
if __name__ == "__main__":
    P, Q, R = map(int, input().split())

    print(sum([P, Q, R]) - max([P, Q, R]))

Solution (Python):
from itertools import permutations

P, Q, R = map(int, input().split())
ans = 1000000
for t in permutations([P, Q, R], 2):
    ans = min(ans, sum(t))
print(ans)

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

a = P+Q
b = Q+R
c = R+P
ans = min(a,b,c)

print(ans)

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

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

m = max(p,q,r)

print(p+q+r-m)

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

ans = float('inf')
ans = min(ans, P + Q)
ans = min(ans, R + Q)
ans = min(ans, P + R)
ans = min(ans, Q + R)
ans = min(ans, Q + P)
ans = min(ans, Q + P)

print(ans)

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

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

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

R1 = P+Q
R2 = P+R
R3 = Q+R

print(min(R1,R2,R3))

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

def main():
    input = sys.stdin.readline
    A = list(map(int, input().split()))
    A.sort()
    return sum(A[:2])


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

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

answer = []
answer.append(P+Q)
answer.append(R+Q)
answer.append(P+R)

print(min(answer))

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

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

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

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

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

Solution (Python):
def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [P, Q, R] = list(map(lambda x: int(x), inputs[0].split()))
    l = []
    l.append(P + Q)
    l.append(P + R)
    l.append(Q + R)

    min = P + Q
    for i in l:
        min = i if min > i else min
    return min


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):

if __name__ == '__main__':
    p,q,r = list(map(int, input().split()))

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

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

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

Solution (Python):
def resolve():
    Hs = list(map(int, input().split(" ")))
    sums = sum(Hs)
    maxh = max(Hs)
    print(sums - maxh)
        

if '__main__' == __name__:
    resolve()

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

a=n+k
b=k+l
c=l+n
print(min(a,b,c))

Solution (Python):
i = input().split(" ")

P = int(i[0])
Q = int(i[1])
R = int(i[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=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):
P,Q,R = map(int,input().split())
lists = [P,Q,R]
lists.sort()
print(lists[0] + lists[1])

Solution (Python):


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

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

Solution (Python):


from collections import deque
import itertools as ite
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

A, B, C = map(int, raw_input().split())
print min(A + B, B + C, C + A)

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

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

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

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

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

min=10000

if p+q<min:
    min=p+q
if q+r<min:
    min=q+r
if r+p<min:
    min=r+p

print(min)

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

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

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

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

Solution (Python):

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

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

e = min(p+q,q+r,r+p)

print(e)

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()))
a = max(T)
T.remove(a)
print(sum(T))

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

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

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

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

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

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

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

Solution (Python):


import sys                                                      
sys.setrecursionlimit(10**6)                                    
from collections import deque, Counter                          
from itertools   import accumulate, permutations, combinations  
from operator    import itemgetter                              
from bisect      import bisect_left, bisect_right, bisect       
from heapq       import heappop, heappush                       
from fractions   import gcd                                     
from math        import ceil, floor, sqrt, cos, sin, tan, pi    
from copy        import deepcopy                                
import numpy         as np                                      


def main():
    
    im = InputManager()
    
    pqr = im.inputMultiple(aslist=True)
    
    print("{}".format(sum(pqr) - max(pqr)))
    

    
    return


class InputManager(object):
    def __init__(self):
        pass

    @staticmethod
    def inputSingle(dtype=int):
        return dtype(input())
    
    @staticmethod
    def inputMultiple(dtype=int, aslist=False):
        if aslist:
            return list(map(dtype, input().split()))
        else:
            return map(dtype, input().split())

    @staticmethod
    def input2D(h, dtype=int):
        return [list(map(dtype, input().split())) for i in range(h)]


main()

Solution (Python):

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

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

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

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

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

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

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

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

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


ps.sort()
ans = 0

for i in range(2):
    ans+= ps[i]

print (ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    li = LI()
    li.sort()
    ans = sum(li[:2])
    return ans

print(main())

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

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

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

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

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

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

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

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

import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a = f()
    print(sum(a) - max(a))

solve()

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

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

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


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

l=LIST()

l.sort()
print(sum(l[:2]))

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

from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


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




BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

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

Solution (Python):

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

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

maxs = max(a,b,c)

print(a + b + c - maxs)

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

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

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

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

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

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

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

nums = sorted(nums)

print(sum(nums[:2]))

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

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

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

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

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

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

l=[p,q,r]
print(sum(l)-max(l))

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


if __name__ == '__main__':
    main()

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

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

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

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