function Main(input) {
  const LINE = input.split("\n");
  const NT   = LINE[0].split(" ");
  const Ti   = LINE[1].split(" ");
  const N    = parseFloat(NT[0]);
  const T    = parseFloat(NT[1]);
  let   showerCount = T;
  for(let i=1; i<N; i++){
    let TiI = parseFloat(Ti[i]);
    if (T > TiI) {
      showerCount -= (T-TiI);
      showerCount += T;
    } else if (T <= TiI) {
      showerCount += T;
    }
  }
  console.log(showerCount);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
