Keep a part counter then use modulo. If R[x] % 2 = 0, ... That logic will be true for every even numbered part.