Requested Sir,In first line how you find the the formula N-(N+1/2)-1. to print pattern

Sir Please tell how you find the formula for No.of spaces in the first line