program main implicit none integer::N integer*8,allocatable::d(:) integer::x,y,maxd,maxxy,count read *,n allocate(d(n)) read *,d read *,x,y x = abs(x) y = abs(y) maxd = MAXVAL(d) maxxy= MAX(x,y) count = maxxy/maxd if(maxxy.eq.0) then print '(i0)', 0 else if(ANY(maxxy.eq.d)) then print '(i0)', 1 else if(2*maxd.ge.maxxy) then print '(i0)', 2 else count = (maxxy - 2*maxd + maxd - 1)/maxd print '(i0)', count + 2 end if end program main