package no033; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map.Entry; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); int t = sc.nextInt(); HashMap> hm = new HashMap<>(); for(int i=0;i al = new ArrayList<>(); al.add((x-r)/d); hm.put(r, al); } } long ans = 0; for(Entry> e:hm.entrySet()) { ArrayList al = e.getValue(); Collections.sort(al); int right = -(1<<30); for(int x: al) { if (right < x - t) { ans += t * 2 + 1; }else{ ans += x + t - right; } right = x + t; } } System.out.println(ans); } }