import java.util.*; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d; if(a == b && b == c) { d = a; } else if(a == b) { d = c; } else if(a == c) { d = b; } else if(b == c) { d = a; } else { d = 6 - (a + b + c); } System.out.println(d); } }