#include <bits/stdc++.h>
using namespace std;
long long n, x, y;
long long a, b, cnt;
long long d[200005], vis[200005];
vector<long long> mp[200005];
int dfs(long long t, long long pre) {
  int lft = 2;
  for (int i = 0; i < mp[t].size(); i++) {
    long long v = mp[t][i];
    if (v == pre) continue;
    if (dfs(v, t) && lft > 0) {
      lft--;
      cnt++;
    }
  }
  return lft > 0;
}
int main() {
  scanf("%lld%lld%lld", &n, &x, &y);
  memset(d, 0, sizeof(d));
  for (int i = 1; i <= n; i++) mp[i].clear();
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &a, &b);
    d[a]++, d[b]++;
    mp[a].push_back(b);
    mp[b].push_back(a);
  }
  if (x >= y) {
    cnt = 0;
    for (int i = 1; i <= n; i++)
      if (d[i] == n - 1) cnt = 1;
    if (cnt == 0)
      printf("%lld\n", (long long)(n - 1) * y);
    else
      printf("%lld\n", (long long)x + (long long)(n - 2) * y);
  } else {
    cnt = 0;
    dfs(1, -1);
    printf("%lld\n", (long long)cnt * x + (long long)(n - 1 - cnt) * y);
  }
  return 0;
}
