#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
inline bool mina(A &x, const B &y) {
  return (y < x) ? (x = y, 1) : 0;
}
template <class A, class B>
inline bool maxa(A &x, const B &y) {
  return (x < y) ? (x = y, 1) : 0;
}
int N;
long long X, Y;
vector<int> E[(200004)];
int V[(200004)];
int dp[(200004)][2];
int sum[(200004)];
priority_queue<int> Q[(200004)];
vector<int> T;
void dfs(int u) {
  V[u] = 1;
  for (int v : E[u])
    if (!V[v]) {
      dfs(v);
      sum[u] += dp[v][0];
      Q[u].push(dp[v][0] - dp[v][1]);
      if (int((Q[u]).size()) > 2) Q[u].pop();
    }
  T.clear();
  while (!Q[u].empty()) {
    T.push_back(Q[u].top());
    Q[u].pop();
  }
  dp[u][1] = sum[u];
  if (int((T).size()) >= 1) maxa(dp[u][1], sum[u] - T.back() + 1);
  dp[u][0] = dp[u][1];
  if (int((T).size()) == 2) maxa(dp[u][0], sum[u] - T[0] - T[1] + 2);
}
int main() {
  {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
  };
  cin >> N >> X >> Y;
  if (N == 2) {
    cout << X << '\n';
    return 0;
  }
  for (int _n = (N - 1); _n--;) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    E[a].push_back(b);
    E[b].push_back(a);
  }
  dfs(0);
  long long sol = dp[0][0] * X + (N - 1 - dp[0][0]) * Y;
  int md = 0;
  for (int _b = (N), i = (0); i < _b; ++i) maxa(md, int((E[i]).size()));
  if (md == N - 1)
    mina(sol, (N - 2) * Y + X);
  else
    mina(sol, (N - 1) * Y);
  cout << sol << '\n';
  return 0;
}
