#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:160777216")
using namespace std;
int n, i, j, k, m;
vector<int> g[300000];
long long x, y;
int u[300000], v[300000];
int s = 0;
int d[100][100];
void dfs(int x) {
  u[x] = 1;
  int i;
  int cnt = 0;
  for (i = 0; i < g[x].size(); i++) {
    int y = g[x][i];
    if (!u[y]) {
      dfs(y);
      if (!v[y]) cnt++;
    }
  }
  if (cnt > 1) {
    s += cnt - 1;
    v[x] = 1;
  }
}
int main() {
  cin >> n >> x >> y;
  for (i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  if (n <= 10) {
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= n; j++) d[i][j] = y;
    }
    for (i = 1; i <= n; i++) {
      for (j = 0; j < g[i].size(); j++) d[i][g[i][j]] = x;
    }
    vector<int> v;
    for (i = 1; i <= n; i++) v.push_back(i);
    long long ans = 1000000000000000000LL;
    do {
      long long sum = 0;
      for (i = 1; i < v.size(); i++) sum += d[v[i]][v[i - 1]];
      ans = min(ans, sum);
    } while (next_permutation(v.begin(), v.end()));
    cout << ans << endl;
    return 0;
  }
  int nom = 1;
  for (i = 1; i <= n; i++)
    if (g[i].size() == 1) nom = i;
  dfs(nom);
  long long cnt = s + 1;
  long long yy = cnt - 1;
  long long xx = n - 1 - (cnt - 1);
  long long ans = yy * y + xx * x;
  long long good = 0;
  for (i = 1; i <= n; i++) {
    if (g[i].size() == n - 1) good++;
  }
  ans = min(ans, x * (long long)(good) + y * (long long)(n - 1 - good));
  cout << ans << endl;
  return 0;
}
