This equation computes the length you must cut a brick to start a row, such that the head joint is centered over the center of the previous row. The previous row started with a full brick, so you're trying to line-up the center of the first head joint on this present row with the center of the brick immediately below.
The inputs to this equation are: