#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int dp[N][0];
vector<int> g[N];
void dfs(int v, int p) {
  int mn1 = N, mn2 = N;
  int sum = 0;
  for (int u : g[v]) {
    if (u == p) continue;
    dfs(u, v);
    sum += dp[u][1];
    static int diff;
    diff = dp[u][0] - dp[u][1];
    if (diff < mn1) {
      mn2 = mn1;
      mn1 = diff;
    } else if (diff < mn2)
      mn2 = diff;
  }
  dp[v][0] = min(sum + 1, sum + mn1);
  dp[v][1] = min(dp[v][0], sum + mn1 + mn2 - 1);
}
int main() {
  int n;
  scanf("%d", &n);
  int x, y;
  scanf("%d%d", &x, &y);
  for (int i = 1; i < n; ++i) {
    static int u, v;
    scanf("%d%d", &u, &v);
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  if (x >= y) {
    for (int v = 0; v < n; ++v) {
      if ((int)g[v].size() == n - 1) {
        printf("%lld", y * 1LL * (n - 2) + x);
        return 0;
      }
    }
    printf("%lld", y * 1LL * (n - 1));
  } else {
    dfs(0, -1);
    printf("%lld", x * 1LL * (n - 1) + (y - x) * 1LL * (dp[0][1] - 1));
  }
}
