func_code_string: #include <bits/stdc++.h>   using namespace std;   using ll = long long;   using pll = pair<ll, ll>;   using dd = long double;   namespace {   static bool constexpr dbg = 0;   ll constexpr N = -1;   ll n, a, b, c;   void init() { cin >> n >> a >> b >> c; }   void solve() {     if (n == 1)       cout << 0;     else if (n == 2)       cout << min(a, b);     else       cout << (min(a, b) + (n - 2) * min({a, b, c}));   }   }  // namespace   int main() {     if (!dbg) {       std::ios::sync_with_stdio(0);       cin.tie(0);       cout.tie(0);     }     cout << fixed << setprecision(20);     init();     solve();     return 0;   }   