Java: Round an Integer to an element of a given List

Supose i have a List of Integers: ints = {0,10,20,30,40,50} and an input value input = 17 How do i get the closest integer of the list to the given input? For my example it would be 20. Or to restate …