import java.util.Scanner; public class GetPointOnCircle { 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 = sc.nextInt(); int b = sc.nextInt(); if(a>b) { int g = b; b=a; a=g; } int out = 0; if(4<=a) { out = a-4; } else if(a+4==b){ out = b+4; } else { out = a+4; } if(out==12) { out = 0; } log(out); } }