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