import java.math.BigInteger; import java.util.*; public class Main { static int[] grandy; static int cul(int x){ int www=x; if(grandy[x]!=-1) return grandy[x]; Set set = new HashSet<>(); for(int i=2;i*i<=x;i++){ if(x%i==0){ x/=i; set.add(cul(www/i)); if(x%i==0){ set.add(cul(www/(i*i))); while(x%i==0) x/=i; } } } if(x>1){ set.add(cul(www/x)); } int res=0; while(set.contains(res)) res++; return grandy[www]=res; } public static void main(String[] args) { Scanner sc=new Scanner(System.in); grandy = new int[10001]; Arrays.fill(grandy, -1); grandy[0]=0; grandy[1]=0; for(int i=2;i<10001;i++){ grandy[i]=cul(i); } int n = sc.nextInt(); int ans=0; for(int i=0;i