func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int s, x1, x2, t1, t2, p, d;     cin >> s >> x1 >> x2 >> t1 >> t2 >> p >> d;     int cnt = 0, initial_position = p;     while (initial_position != x1) {       if (initial_position == s) d = -1;       if (initial_position == 0) d = 1;       initial_position += d;       cnt++;     }     while (initial_position != x2) {       if (initial_position == s) d = -1;       if (initial_position == 0) d = 1;       initial_position += d;       cnt++;     }     int ans = min(abs(x1 - x2) * t2, cnt * t1);     cout << ans;     return 0;   }   