($h,$a,$d)=glob<>;print+(sort{$a<=>$b}map$_+($==($-=$h-$a*$_)/$d+0.999)*1.5,0..$h)[0]