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