#!/usr/bin/env ruby b=0 c=0 i=0 k=0 a = STDIN.gets a = a.chomp x = a.split() b= x[0].to_i c= x[1].to_i while i==0 if b%c==0 k=k+b/c-1 #puts(k) break end if b