#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const double esp = 1e-7;
const int ff = 0x3f3f3f3f;
map<int, int>::iterator it;
int n, x, y;
vector<int> mp[maxn];
int cnt;
int dfs(int x, int f) {
  int k = mp[x].size();
  int d = 2;
  for (int i = 0; i < k; i++) {
    if (mp[x][i] == f) continue;
    int tmp = dfs(mp[x][i], x);
    if (tmp && d > 0) {
      d--;
      cnt++;
    }
  }
  return d > 0 ? 1 : 0;
}
int main() {
  cin >> n >> x >> y;
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    mp[a].push_back(b);
    mp[b].push_back(a);
  }
  if (x < y) {
    dfs(1, -1);
    printf("%lld\n", (long long)x * cnt + (long long)y * (n - 1 - cnt));
  } else {
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      if (mp[i].size() == n - 1) flag = 1;
    }
    if (flag)
      printf("%lld\n", (long long)x + (long long)y * (n - 2));
    else
      printf("%lld\n", (long long)y * (n - 1));
  }
  return 0;
}
