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

Solution (Python):
a, b, c = map(int, input().split())
print(a + b + c - max(a,max(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 = [int(s) for s in input().split()]
    if r >= p and r >= q:
        print(p + q)
    elif p >= r and p >= q:
        print(r + q)
    else:
        print(p + r)




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

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

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

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

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

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())
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):
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(sum([P, Q, R]) - max([P, Q, R]))

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

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

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

Solution (Python):
import sys


A, B , C = map(int, input().split())


X = A + B
Y = B + C
Z = C + A

print(min(X, Y, Z))

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

Solution (Python):
l = input().split()
p,q,r = int(l[0]), int(l[1]), int(l[2])
k = max([p,q,r])
print(p+q+r-k)

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

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

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

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

Solution (Python):




def main():
  a, b, c = map(int, input().split())
  m = max(a, b, c)
  
  print(a + b + c - m)


if __name__ == '__main__':
  main()

Solution (Python):

def read_input():
    x, y, z = map(int, input().split())
    return x, y, z


def submit():
    x, y, z = read_input()

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




if __name__ == '__main__':
    submit()

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(P, Q, R):
    return sum(sorted([P, Q, R])[:2])


def main():
    P, Q, R = read_int_n()
    print(slv(P, Q, R))


if __name__ == '__main__':
    main()

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict
import math


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def mod_inv(x):
    
    global mod
    return pow(x, mod - 2, mod)


def gcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    ret = math.factorial(x)
    ret = ret // (math.factorial(x - y) * math.factorial(y))

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


class UnionFind:

    def __init__(self, n):
        self.parent = [i for i in range(n)]

    def root(self, i):
        if self.parent[i] == i:
            return i
        self.parent[i] = self.root(self.parent[i])
        return self.parent[i]

    def unite(self, i, j):
        rooti = self.root(i)
        rootj = self.root(j)
        if rooti == rootj:
            return
        if rooti < rootj:
            self.parent[rootj] = rooti
        else:
            self.parent[rooti] = rootj

    def same(self, i, j):
        return self.root(i) == self.root(j)





def main():
    p, q, r = intina()

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


if __name__ == '__main__':
    main()

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

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

time.sort()

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

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

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

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

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

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

p_arr.sort()

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

Solution (Python):

 
import math
import numpy as np
import random
import copy
import statistics 
import bisect
import heapq
from collections import defaultdict 
import time

L = [ int(x) for x in input().split() ]

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

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

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

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

Solution (Python):


a = [int(i) for i in input().split()] 


a.sort()

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**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 sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

def main(): 
    P, Q, R = LI()
    print(P+Q+R-max(P,Q,R))

main()

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

Solution (Python):
import numpy as np
words = lambda t : list(map(t, input().split()))
pqr = words(int)

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):
import sys
from collections import Counter, deque, defaultdict
from itertools import accumulate, permutations, combinations, takewhile, compress, cycle
from functools import reduce
from math import ceil, floor, log10, log2, factorial
from pprint import pprint

sys.setrecursionlimit(1000000)






P, Q, R = [int(x) for x in 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):
pqr = list(map(lambda x: int(x), input().split()))
p = pqr[0]
q = pqr[1]
r = pqr[2]

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

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

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

Solution (Python):
import sys

stdin = sys.stdin

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

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

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

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

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

l = [P,Q,R]
l.sort()

print(sum(l[:2]))

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

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

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

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

print(sum(inn)-max(inn))

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

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

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

Solution (Python):

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

P, Q, R = nl()

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

Solution (Python):


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

max_pqr = max(p,q,r)

print(p+q+r-max_pqr)

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

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

Solution (Python):


import sys
sys.dont_write_bytecode = True
stdin = sys.stdin
input = stdin.readline







import math, itertools, operator
from math import *
from math import factorial as fact
from operator import itemgetter, attrgetter
from itertools import permutations, combinations
from functools import reduce


from fractions import gcd
from fractions import Fraction as Frac

inf = float('inf')

def lcm(a, b):
    return a * b // gcd(a,b)

def perm(a, b):
    import scipy.special
    return scipy.special.perm(a, b, exact = True)

def comb(a, b):
    import scipy.special
    return scipy.special.comb(a, b, exact = True)

def dfact(n):
    import scipy.special
    return scipy.special.factorial2(n, exact = True)

def prod(l):
    return reduce(operator.mul, l)

def input_ints(func = input, sep = None, conv = int):
    return list(map(conv, func().split(sep = sep)))



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

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

list_a.sort()

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(100000)

def intinput(): return map(int,sys.stdin.readline().split())

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

Solution (Python):

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

sum_ = P+Q+R
print(sum_ - 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):

"""



"""
import sys


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


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


if __name__ == '__main__':
    main(sys.argv[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(sum([P, Q, R]) - max([P, Q, R]))

Solution (Python):
import sys
sys.setrecursionlimit(2000000000)
input=lambda : sys.stdin.readline().rstrip('\n')
d=list(map(int,input().split()))
print(sum(d)-max(d))

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

Solution (Python):
import sys, math, collections, heapq, itertools
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    file = sys.stdin.readline 
    INF = 10 ** 25
    mod = 7 + 10 ** 9
    P, Q, R = map(int, file().split())
    print(P + Q + R - max(P, Q, R))
    return 0
  
if __name__ == "__main__":
    solve()

Solution (Python):
import sys
input=sys.stdin.readline
from collections import deque
from heapq import heappush,heappop
import re

def int_raw():
    return int(input())
 
def ss_raw():
    return input().split()
 
def ints_raw():
    return tuple(map(int, ss_raw()))


DIV=10**9+7

def mod_invs(n,mod=DIV):
    inv=[0]*(n+1)
    inv[0]=1
    inv[1]=1
    for i in range(2,n+1):
        inv[i] = (-(mod//i)*inv[mod%i]) % mod
    return inv



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

print(main())

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())
A=max(P,Q)
B=max(A,R)
print(P+Q+R-B)

Solution (Python):
P, Q, R = map(int, input().split())
A = [P, Q, R]
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(min(p+q,q+r,r+p))

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

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

def solve():
    P, Q, R = [int(_) for _ in raw_input().split()]
    ret = min(P+Q, Q+R, P+R)
    print ret

if __name__ == '__main__':
    solve()

Solution (Python):
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g




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

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

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

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

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

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

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

solve()

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):
A, B, C = map(int, input().split())
print(A+B+C-max(A,B,C))

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

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

Solution (Python):

import sys


def solve(P: int, Q: int, R: int):
    l = [P, Q, R]
    l.sort()
    print(l[0]+l[1])
    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):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())


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

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

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

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

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

m = max(p, q, r)

print(p + q + r - m)

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):
p,q,r = [ int(v) for v in input().split() ]
print(min(p+q,p+r,r+q))

Solution (Python):

import sys
INF = float("inf")


def solve(P: int, Q: int, R: int):
    print(P+Q+R-max([P, 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())

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 = [int(item) for item in input().split()]
a.sort()
print(a[0] + a[1])

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

Solution (Python):

def main():
    buf = input()
    buflist = buf.split()
    P = int(buflist[0])
    Q = int(buflist[1])
    R = int(buflist[2])
    print(min(P+Q, Q+R, R+P))


if __name__ == '__main__':
    main()

Solution (Python):
a,b,c=map(int,input().split())
A = a+b
B = b+c
C = c+a
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(p+q+r-max(p,q,r))

Solution (Python):

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

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

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

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

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


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def SI(): return input()


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


main()

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

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

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

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.sort()
print(a[0]+a[1])

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

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

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

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

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

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

Solution (Python):
import sys

from collections import deque

from collections import defaultdict

import heapq

import bisect





s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    X = i2nn()
    X.sort()
    n = sum(X[:2])
    print(n)

main()

Solution (Python):

import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(P: int, Q: int, R: int):
    return sum([P, Q, R]) - max(P, Q, R)

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))  
    result = solve(P, Q, R)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(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())
print(min(p+q, q+r, p+r))

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

Solution (Python):
P, Q, R = map(int, 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):
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 collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul,itemgetter
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)


def main():
    *a,=map(int,input().split())
    print(sum(sorted(a)[:2]))
if __name__ == '__main__':
    main()

Solution (Python):

import sys


def solve(P: int, Q: int, R: int):
    print(sum([P, Q, R]) - max([P, 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):

a = [int(i) for i in input().split()]

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

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

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

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

Solution (Python):




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

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

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

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

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

Solution (Python):
import sys
from collections import deque
from operator import itemgetter

input = sys.stdin.readline

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

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

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

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

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

Solution (Python):
def getN():
    return int(input())

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

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

cost = getlist()
print(sum(cost) - max(cost))

Solution (Python):
A, B, C = sorted(map(int,input().split()))

print(A+B)

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

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

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

Solution (Python):
import sys
from collections import deque
from collections import defaultdict
import math
sys.setrecursionlimit(20000000)
input = sys.stdin.readline
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):
p = list(map(int, input().split()))

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

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

Solution (Python):
P, Q, R = [int(x) for x in input().split()]
a = sorted([P, Q, R])
print(sum(a[: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))