#include <bits/stdc++.h>
using namespace std;
vector<int> vec[200005];
long long int link, tree = 0;
int dfs(int x, int fa) {
  int i, si, y, son, tmp;
  son = 2;
  si = vec[x].size();
  for (i = 0; i < si; i++) {
    y = vec[x][i];
    if (y == fa) continue;
    tmp = dfs(y, x);
    if (tmp && son) {
      son--;
      tree++;
    }
  }
  return son > 0;
}
int main(int argc, char** argv) {
  long long int x, y, res;
  int n, v, u;
  int i, j;
  scanf("%d%lld%lld", &n, &x, &y);
  for (i = 0; i < n; i++) vec[i].clear();
  for (i = 0; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    vec[u].push_back(v);
    vec[v].push_back(u);
  }
  if (y <= x) {
    link = n - 1;
    for (i = 1; i <= n; i++)
      if (vec[i].size() == n - 1) link = n - 2;
    res = link * y + (n - 1 - link) * x;
    printf("%lld\n", res);
  } else {
    dfs(1, 0);
    res = tree * x + (n - 1 - tree) * y;
    printf("%lld\n", res);
  }
  return 0;
}
