Cast first and last to a number