Multiple of 2 and N

AtCoder - abc102_a