Exception-free implementation for Alex from Minsk.