#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
const int inf = 1e9;
int n, x, y;
int dp[N][2];
vector<int> g[N];
void dfs(int v, int p) {
  bool flag = false;
  for (int i = 0; i < g[v].size(); i++)
    if (g[v][i] != p) {
      flag = true;
      dfs(g[v][i], v);
    }
  dp[v][0] = inf;
  dp[v][1] = inf;
  if (!flag) {
    dp[v][0] = 1;
    dp[v][1] = 1;
    return;
  }
  int sum = 0;
  for (int i = 0; i < g[v].size(); i++) {
    if (g[v][i] != p) {
      sum += dp[g[v][i]][0];
    }
  }
  int val1 = inf, val2 = inf;
  int cnt = 0;
  for (int i = 0; i < g[v].size(); i++)
    if (g[v][i] != p) {
      int u = g[v][i];
      cnt++;
      int val = dp[u][1] - dp[u][0];
      if (val < val1) {
        val2 = val1;
        val1 = val;
      } else if (val < val2) {
        val2 = val;
      }
    }
  dp[v][1] = sum + val1;
  dp[v][0] = dp[v][1];
  if (cnt >= 2) dp[v][0] = min(dp[v][0], sum + val1 + val2 - 1);
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  long long ans = 0;
  if (y <= x) {
    bool flag = true;
    for (int i = 1; i <= n; i++)
      if (g[i].size() == n - 1) flag = false;
    if (flag)
      ans = 1ll * (n - 1) * y;
    else
      ans = 1ll * (n - 2) * y + x;
  } else {
    dfs(1, -1);
    int val = dp[1][0];
    ans = 1ll * (val - 1) * y + 1ll * (n - val) * x;
  }
  cout << ans;
  return 0;
}
