It's slightly more idiomatic to use a `do...while` loop here (seeing as you always want to do the loop at least once).