Use div(x,2) instead of int(x/2)

add const