n,d,t,*x=$<.read.split.map &:to_i
t.times{y=[];x.map{|e|y+=[e-d,e,e+d]};x=y|[]}
p x.uniq.size