Add method to find closest integer to the input