James58899 says to YSITD
1280:trunc(ow/a/2)*2