#include <bits/stdc++.h>
using namespace std;
template <typename T>
T sqr(T x) {
  return x * x;
}
const int maxn = 200003;
vector<int> g[maxn], gr[maxn];
bool used[maxn];
int ans[maxn][2];
void dfs(int v) {
  used[v] = true;
  for (int to : g[v])
    if (!used[to]) {
      gr[v].push_back(to);
      dfs(to);
    }
  if (gr[v].size() == 0) {
    ans[v][0] = ans[v][1] = 0;
  } else if (gr[v].size() == 1) {
    ans[v][0] = ans[v][1] = ans[gr[v][0]][1];
  } else {
    int sum = 0;
    vector<int> f;
    for (int x : gr[v]) {
      sum += ans[x][0];
      f.push_back(ans[x][1] - ans[x][0]);
    }
    sort(f.begin(), f.end());
    ans[v][0] = sum + f[0] + f[1] + gr[v].size() - 2;
    ans[v][1] = sum + f[0] + gr[v].size() - 1;
  }
}
long double dist(long long x1, long long fdsafdsa, long long x2, long long y2) {
  return sqrt(sqr(x1 - x2) + sqr(fdsafdsa - y2));
}
int main() {
  int n, X, Y;
  cin >> n >> X >> Y;
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  if (X >= Y) {
    int x = 0;
    for (int i = 1; i <= n; i++)
      if ((int)g[i].size() == n - 1) {
        x++;
        break;
      }
    cout << Y * 1ll * (n - 1 - x) + x * X << "\n";
  } else {
    dfs(1);
    int x = ans[1][0];
    long long ans = x * 1ll * Y + (n - x - 1) * 1ll * X;
    cout << ans << "\n";
  }
  return 0;
}
