import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  }

} import java.util.*; util.* java public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  }

} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  } main {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int p = sc.nextInt(); p sc.nextInt() sc.nextInt sc int q = sc.nextInt(); q sc.nextInt() sc.nextInt sc int r = sc.nextInt(); r sc.nextInt() sc.nextInt sc int[] data = new int[3]; data new int[3] 3 data[0] = p + q data[0] data 0 p + q p q data[1] = q + r data[1] data 1 q + r q r data[2] = r + p data[2] data 2 r + p r p int min = data[0]; min data[0] data 0 for(int i = 0;i < 3;i++) min = Math.min(min,data[i]); int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i min = Math.min(min,data[i]); min = Math.min(min,data[i]) min Math.min(min,data[i]) Math.min Math min data[i] data i System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  }

} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  }

} Main
import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();

    int[] data = new int[3];

    data[0] = p + q;
    data[1] = q + r;
    data[2] = r + p;

    int min = data[0];

    for(int i = 0;i < 3;i++) min = Math.min(min,data[i]);

    System.out.println(min);


  }

}
