min() function would do the trick, have you tried it?