#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 4e5 + 10;
const int INF = 0x3f3f3f3f;
vector<int> g[maxn];
long long ans = 0;
bool dfs(int u, int fa) {
  int d = 2;
  for (auto to : g[u]) {
    if (to == fa) continue;
    if (dfs(to, u) && d) {
      d--;
      ans++;
    }
  }
  return d > 0;
}
int main() {
  int n, x, y, u, v;
  scanf("%d", &n);
  scanf("%d", &x);
  scanf("%d", &y);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d", &u);
    scanf("%d", &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  if (x >= y) {
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      int sz = g[i].size();
      if (sz == n - 1) flag = 1;
    }
    if (flag) {
      ans = 1LL * x + 1LL * (n - 2) * y;
    } else {
      ans = 1LL * (n - 1) * y;
    }
    printf("%lld\n", ans);
  } else {
    dfs(1, 0);
    ans = (n - ans - 1) * y + ans * x;
    printf("%lld\n", ans);
  }
  return 0;
}
