#include <bits/stdc++.h>
using namespace std;
int n, ux, uy, ukupno1, marka[200005], otac[200005];
long long int cx, cy, r;
vector<int> mg[200007];
void dfs(int cvor) {
  int i, x;
  for (i = 0; i < mg[cvor].size(); i++) {
    x = mg[cvor][i];
    if (marka[x] == 0) {
      marka[x] = 3 - marka[cvor];
      if (marka[x] == 1) ukupno1++;
      dfs(x);
    }
  }
}
int dfsss(int cvor) {
  int i, x, slobodan, moguce = 2;
  marka[cvor] = 1;
  for (i = 0; i < mg[cvor].size(); i++) {
    x = mg[cvor][i];
    if (marka[x] == 0) {
      if (dfsss(x) && moguce > 0) {
        moguce--;
        ux++;
      }
    }
  }
  return moguce > 0;
}
int main() {
  int i, j, k, a, b, x;
  cin >> n >> cx >> cy;
  for (i = 1; i < n; i++) {
    cin >> a >> b;
    mg[a].push_back(b);
    mg[b].push_back(a);
  }
  marka[1] = 1;
  ukupno1 = 1;
  dfs(1);
  if (cx >= cy) {
    if (ukupno1 == 1 || ukupno1 == n - 1) {
      uy = n - 2;
      ux = 1;
    } else {
      uy = n - 1;
      ux = 0;
    }
  } else {
    for (i = 1; i <= n; i++) marka[i] = 0;
    dfsss(1);
    uy = n - 1 - ux;
  }
  r = cy * uy + cx * ux;
  cout << r;
  return 0;
}
