Finding Smallest Element Math