How to increase an integer by 1 every 2 of another integer

Hey guys!

First time posting here! I am currently making a RPG that is somewhat similar to Runescape but 2D. I am currently stuck on how to increase the player’s max hit (by 1) every 2 strength levels. The combat system is going to be using Random.Range(0, maxHit).

maxHit is going to be affected by the strength but I have no idea how to actually make the ‘maxHit’ variable increase for every 2 strength levels. Currently starting at 1 strength, the player can hit anywhere from 0 to a max hit of 2.

I would love some help to point me in the right direction or an explanation on how to do this!

Uhm, simply:

maxHit = 1 + strength / 2;