#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200005];
const int inf = 1e9 + 7;
int dp[200005][2], vis[200005][2], chk[200005], prv[200005];
void dfs(int u) {
  chk[u] = 1;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (!chk[v]) {
      prv[v] = u;
      dfs(v);
    }
  }
}
int calc(int u, int id) {
  if (vis[u][id]) return dp[u][id];
  vis[u][id] = 1;
  int res = 0, cnt0 = 0, cnt1 = 0;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v == prv[u]) continue;
    if (calc(v, 0) < calc(v, 1))
      res += calc(v, 0), cnt0++;
    else
      res += calc(v, 1), cnt1++;
  }
  if (id) {
    if (cnt1)
      return dp[u][1] = res;
    else
      return dp[u][1] = res + 1;
  }
  if (cnt1 >= 2)
    return dp[u][0] = res - 1;
  else if (cnt0 == 1 && !cnt1)
    return dp[u][0] = inf;
  else if (cnt1 == 1)
    return dp[u][0] = res;
  return dp[u][0] = res + 1;
}
int main() {
  int n, x, y, u, v;
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (x >= y) {
    int f = 0;
    for (int i = 1; i <= n; i++)
      if (adj[i].size() == n - 1) f = 1;
    printf("%lld\n", 1LL * x * f + 1LL * y * (n - f - 1));
    return 0;
  }
  dfs(1);
  int ans = min(calc(1, 0), calc(1, 1));
  printf("%lld\n", 1LL * (ans - 1) * y + 1LL * (n - ans) * x);
  return 0;
}
