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