#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
void chmin(T &t, U f) {
  if (t > f) t = f;
}
template <class T, class U>
void chmax(T &t, U f) {
  if (t < f) t = f;
}
const long long SIZE = 200000;
long long n, x, y;
vector<long long> g[SIZE];
long long dp[SIZE][2];
void dfs(long long v, long long p) {
  long long sum = 0;
  long long delta1 = INT_MAX, delta2 = INT_MAX;
  for (long long i = 0; i < (g[v].size()); i++) {
    long long u = g[v][i];
    if (u == p) continue;
    dfs(u, v);
    sum += dp[u][1];
    long long d = dp[u][1] - dp[u][0];
    if (d < delta1) {
      delta2 = delta1;
      delta1 = d;
    } else if (d < delta2) {
      delta2 = d;
    }
  }
  dp[v][0] = max(sum, sum + 1 - delta1);
  dp[v][1] = max(dp[v][0], sum + 2 - delta1 - delta2);
}
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> x >> y;
  for (long long i = 0; i < (n - 1); i++) {
    long long v, u;
    cin >> v >> u;
    v--;
    u--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  if (x >= y) {
    bool f = false;
    for (long long i = 0; i < (n); i++) f |= (g[i].size() == n - 1);
    if (f)
      cout << (n - 2) * y + x << endl;
    else
      cout << (n - 1) * y << endl;
    return 0;
  }
  dfs(0, -1);
  cout << dp[0][1] * x + (n - dp[0][1] - 1) * y << endl;
  return 0;
}
