from itertools import permutations

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

t = {
    "A": {
        "B": P,
        "C": R
    },
    "B": {
        "A": P,
        "C": Q
    },
    "C": {
        "A": R,
        "B": Q
    }
}
# check
P = list(permutations(["A", "B", "C"], 3))
T = [sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P]

print(min(T)) from itertools import permutations P, Q, R = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split Q R t = {
    "A": {
        "B": P,
        "C": R
    },
    "B": {
        "A": P,
        "C": Q
    },
    "C": {
        "A": R,
        "B": Q
    }
} t {
    "A": {
        "B": P,
        "C": R
    },
    "B": {
        "A": P,
        "C": Q
    },
    "C": {
        "A": R,
        "B": Q
    }
} "A" "A" {
        "B": P,
        "C": R
    } "B" "B" P "C" "C" R "B" "B" {
        "A": P,
        "C": Q
    } "A" "A" P "C" "C" Q "C" "C" {
        "A": R,
        "B": Q
    } "A" "A" R "B" "B" Q P = list(permutations(["A", "B", "C"], 3)) P list(permutations(["A", "B", "C"], 3)) list permutations(["A", "B", "C"], 3) permutations ["A", "B", "C"] "A" "B" "C" 3 sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P for p in P p P for p in P sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) sum [t[p[i]][p[i + 1]]for i in range(0, 2)] T = [sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P] T [sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P] print(min(T)) print min(T) min T P, Q, R = map(int, input().split()) map(int, input().split()) P T = [sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P] [sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P] T P = list(permutations(["A", "B", "C"], 3)) list(permutations(["A", "B", "C"], 3)) P t = {
    "A": {
        "B": P,
        "C": R
    },
    "B": {
        "A": P,
        "C": Q
    },
    "C": {
        "A": R,
        "B": Q
    }
} {
    "A": {
        "B": P,
        "C": R
    },
    "B": {
        "A": P,
        "C": Q
    },
    "C": {
        "A": R,
        "B": Q
    }
} t R = map(int, input().split()) map(int, input().split()) R Q, R = map(int, input().split()) map(int, input().split()) Q
from itertools import permutations

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

t = {
    "A": {
        "B": P,
        "C": R
    },
    "B": {
        "A": P,
        "C": Q
    },
    "C": {
        "A": R,
        "B": Q
    }
}
# check
P = list(permutations(["A", "B", "C"], 3))
T = [sum([t[p[i]][p[i + 1]]for i in range(0, 2)]) for p in P]

print(min(T))