#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 7;
long long n, x, y, wz;
vector<long long> G[N];
long long w[N];
long long vis[N];
void dfs(long long v) {
  vis[v] = 1;
  long long cnt = 0;
  for (auto it : G[v]) {
    if (!vis[it]) {
      dfs(it);
      if (w[it]) ++cnt;
    }
  }
  wz += min(cnt, 2ll);
  if (cnt <= 1) w[v] = 1;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> x >> y;
  for (long long i = 1; i < n; ++i) {
    long long a, b;
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  if (x > y) {
    long long e = 0;
    for (long long i = 1; i <= n; ++i) {
      if (G[i].size() == n - 1) e = 1;
    }
    if (e)
      cout << (n - 2) * y + x << '\n';
    else
      cout << (n - 1) * y << '\n';
  } else {
    dfs(1);
    cout << wz * x + (n - 1 - wz) * y << '\n';
  }
}
