func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     long n, d, a[100000], diff;     long sum = 0;     cin >> n >> d;     for (long i = 0; i < n; i++) cin >> a[i];     for (long i = 1; i < n; i++) {       if (a[i - 1] >= a[i]) {         diff = a[i - 1] - a[i];         a[i] = a[i] + (diff / d + 1) * d;         sum = sum + diff / d + 1;       }     }     cout << sum;     return 0;   }   