#include using namespace std; int main(){ int A,B; cin>>A>>B; int ans = 0; for(int i=B;i<=A;i+=B)if(A%i == 0) ans++; cout<