import java.util.Scanner;

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();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  }
} import java.util.Scanner; Scanner 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();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  }
} 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();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  } main {

    Scanner sc = new Scanner(System.in);

    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  } 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 System.out.println(Math.min(Math.min(p + q, q + r), r + p)) System.out.println System.out System System.out Math.min(Math.min(p + q, q + r), r + p) Math.min Math Math.min(p + q, q + r) Math.min Math p + q p q q + r q r r + p r p 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();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  }
} 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();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  }
} Main
import java.util.Scanner;

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();
    System.out.println(Math.min(Math.min(p + q, q + r), r + p));

  }
}