a=input ().split x=int(a[0])/int(a[1]) if x%1==0: print(int(x)) else: print(0)