Added find the smalles value of an array afer a given number function