{"problem":{"name":"Sentou","description":{"content":"In a public bath, there is a shower which emits water for $T$ seconds when the switch is pushed. If the switch is pushed when the shower is already emitting water, from that moment it will be emitting","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc073_a"},"statements":[{"statement_type":"Markdown","content":"In a public bath, there is a shower which emits water for $T$ seconds when the switch is pushed.\nIf the switch is pushed when the shower is already emitting water, from that moment it will be emitting water for $T$ seconds. Note that it does not mean that the shower emits water for $T$ additional seconds.\n$N$ people will push the switch while passing by the shower. The $i$\\-th person will push the switch $t_i$ seconds after the first person pushes it.\nHow long will the shower emit water in total?\n\n## Constraints\n\n*   $1 ≤ N ≤ 200,000$\n*   $1 ≤ T ≤ 10^9$\n*   $0 = t_1 < t_2 < t_3 < , ..., < t_{N-1} < t_N ≤ 10^9$\n*   $T$ and each $t_i$ are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $T$\n$t_1$ $t_2$ ... $t_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc073_a","tags":[],"sample_group":[["2 4\n0 3","7\n\nThree seconds after the first person pushes the water, the switch is pushed again and the shower emits water for four more seconds, for a total of seven seconds."],["2 4\n0 5","8\n\nOne second after the shower stops emission of water triggered by the first person, the switch is pushed again."],["4 1000000000\n0 1000 1000000 1000000000","2000000000"],["1 1\n0","1"],["9 10\n0 3 5 7 100 110 200 300 311","67"]],"created_at":"2026-03-03 11:01:13"}}