Casting tokens to an int