Bukkit/Bukkit-Bleeding — comment on commit bbe342e49d45571cd1f90420d97cab0712533946
File: src/main/java/org/bukkit/util/ChatPaginator.java line 37
By Zeerix:

int totalPages = lines.length / pageHeight + (lines.length % pageHeight == 0 ? 0 : 1);
-or-
int totalPages = (lines.length + pageHeight - 1) / pageHeight;