import java.util.*; public class Shaffle{ public static void main(String[] arg){ int n,m,a,b,temp,res=0; int[] cap={0,0,0}; Scanner sc = new Scanner(System.in); n = sc.nextInt(); m = sc.nextInt(); cap[n-1]=1; for(int i = 0;i