#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
vector<vector<long long> > G;
pair<long long, long long> dfs(long long v0, long long prev) {
  pair<long long, long long> res(1, v0);
  for (long long v : G[v0]) {
    if (v != prev) {
      pair<long long, long long> p = dfs(v, v0);
      res = max(res, pair<long long, long long>(p.first + 1, p.second));
    }
  }
  return res;
}
long long L() { return dfs(dfs(0, -1).second, -1).first; }
vector<int> par;
void dfsp(int v, int prev) {
  par[v] = prev;
  for (int to : G[v]) {
    if (to == prev) continue;
    dfsp(to, v);
  }
}
int main() {
  long long N, X, Y;
  cin >> N >> X >> Y;
  G.resize(N);
  vector<vector<int> > ch(N);
  for (long long i = 0; i < N - 1; ++i) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    --a, --b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  par.resize(N);
  for (int i = 0; i < N; ++i) par[i] = i;
  dfsp(0, -1);
  for (int i = 0; i < N; ++i) {
    if (par[i] != -1) {
      ch[par[i]].push_back(i);
    }
  }
  if (Y <= X) {
    long long ans = inf;
    if (N == 1) {
      ans = 0;
    } else if (N == 2) {
      ans = X;
    } else {
      long long l = L();
      assert(l >= 3);
      if (l == 3) {
        ans = X + Y * (N - 2);
      } else {
        ans = (N - 1) * Y;
      }
    }
    cout << ans << endl;
  } else {
    vector<int> cnt(N, 0);
    vector<int> cc(N, 0);
    queue<int> Q;
    for (int i = 0; i < N; ++i) {
      cnt[i] = (int)ch[i].size();
      if (cnt[i] == 0) {
        Q.push(i);
      }
    }
    long long useY = 0;
    while (!Q.empty()) {
      int v = Q.front();
      Q.pop();
      if (par[v] != -1) {
        if (--cnt[par[v]] == 0) {
          Q.push(par[v]);
        }
        cc[par[v]] += cc[v] <= 1 ? 1 : 0;
        useY += max(0, cc[v] - 1);
      } else {
        useY += max(0, cc[v] - 2);
      }
    }
    long long ans = useY * Y + (N - 1 - useY) * X;
    cout << ans << endl;
  }
}
