#include <stdio.h> #include <math.h> #define N 1001 void Fun(int a[], int x){ for (int i = 2; i <= sqrt(x); i ++) { while (x%i==0) { a[i]++; x/=i; } } if (x>1) { a[x]++; } } int main(){ int n, a; int pa[N] = {0}; int pb[N] = {0}; scanf("%d%d", &n, &a); Fun(pa, a); for (int i = 2; i <= n; i ++) { Fun(pb, i); } int min = 1000000000; for (int i = 2; i <= a; i ++) { if (pa[i]&&pb[i]/pa[i]<min) { min = pb[i]/pa[i]; } } printf("%d\n", min); return 0; }