I'd agree with this but one of the following lines is N = Math.ceil(N) which guarantees it to be an int