Use casts rather than floor(3)