N, D, T = map(int, input().split()) ameba = {} x = list(map(int, input().split())) for i in x: ameba[i] = 1 for i in range(T): ameba_x = ameba.copy() for k, v in ameba_x.items(): k1 = k - D k2 = k + D ameba[k1] = 1 ameba[k2] = 1 print(sorted(ameba)) print(len(ameba))