Calculate second minimum.