import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class GetLastFruit { public static void log(Object obj) { System.out.println(obj.toString()); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a = new int[3]; boolean[] y = new boolean[4]; for(int i=0;i<3;i++) { a[i] = sc.nextInt(); y[a[i]] = true; } Arrays.sort(a); if(a[1]==a[2]) { log(a[0]); } else if (a[0]==a[1]) { log(a[2]); } else { for(int i=0;i<4;i++) { if(!y[i]) { log(a[i]-1); } } } } }