You don't need the ceil. You're dividing one int with another int. That will implicitly do a ceil.