Dimension with equations

I am trying to figure out an equation with mounting holes putin with the hole wizard. I want my front holes to be a half inchoff the front edge of the mold except when the overall length ofthe mold is on a half inch increment. When the mold length is on ahalf inch increment then I want it to be one inch away from thefront edge. An example is when the mold length is 20" the frontholes will be a 1/2" off the front when the mold length is 20.5 theholes will be 1" off the front edge. Any Ideas?SolidworksSketching