import java.util.*;
import java.io.*;

public class Main
{
  	int p, q, r;
  
    Main(Scanner in, PrintWriter out)
    {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
  	int p, q, r;
  
    Main(Scanner in, PrintWriter out)
    {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} Main int p p q q r; r Main(Scanner in, PrintWriter out)
    {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    } Main {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    } p = in.nextInt() p in.nextInt() in.nextInt in q = in.nextInt() q in.nextInt() in.nextInt in r = in.nextInt() r in.nextInt() in.nextInt in out.println(Math.min(p+q, Math.min(q+r, r+p))) out.println out Math.min(p+q, Math.min(q+r, r+p)) Math.min Math p+q p q Math.min(q+r, r+p) Math.min Math q+r q r r+p r p Scanner in in PrintWriter out out public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} main {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) new	Main(in, out) out.close() out.close out String[] args args public class Main
{
  	int p, q, r;
  
    Main(Scanner in, PrintWriter out)
    {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} public class Main
{
  	int p, q, r;
  
    Main(Scanner in, PrintWriter out)
    {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} Main
import java.util.*;
import java.io.*;

public class Main
{
  	int p, q, r;
  
    Main(Scanner in, PrintWriter out)
    {
    	p = in.nextInt();
      	q = in.nextInt();
      	r = in.nextInt();
      	out.println(Math.min(p+q, Math.min(q+r, r+p)));
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
}
