w=STDIN.gets.to_i d=STDIN.gets.to_i ans=0 d.times do |i| k=d-i p=Rational(w,k*k).to_i w-=p ans=p end puts ans