import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); try { Integer.parseInt(sc.nextLine()); int[] arr = new int[3]; for (int i = 0; i < 3; i++) { arr[i] = Integer.parseInt(sc.nextLine()); } TreeSet sums = new TreeSet<>(); for (int i = 0; i < 2; i++) { for (int j = i + 1; j < 3; j++) { sums.add(arr[i] + arr[j]); } } sums.pollLast(); System.out.println(sums.last()); } catch (Exception e) { System.out.println("\"assert\""); } } }