#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
int N;
long long X, Y;
vector<int> adj[MAXN];
int R = 1, par[MAXN];
void dfs(int x, int p) {
  par[x] = p;
  for (int t : adj[x]) {
    if (t != p) {
      dfs(t, x);
    }
  }
}
int dp[MAXN][2];
int getdp(int x, bool b) {
  int &ref = dp[x][b];
  if (ref != -1) {
    return ref;
  }
  if (adj[x].size() == 1) {
    return ref = 0;
  }
  int mx1 = -1e9, mx2 = -1e9;
  int sno = 0;
  for (int t : adj[x]) {
    if (t == par[x]) {
      continue;
    }
    int v0 = getdp(t, 0), v1 = getdp(t, 1);
    sno += v0;
    int val = -v0 + v1 + 1;
    if (val > mx1) {
      mx2 = mx1;
      mx1 = val;
    } else if (val > mx2) {
      mx2 = val;
    }
  }
  if (b) {
    mx2 = -1e9;
  }
  return ref = sno + max(0, mx1) + max(0, mx2);
}
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  scanf("%d %lld %lld", &N, &X, &Y);
  if (N == 2) {
    printf("%lld\n", X);
    return 0;
  }
  for (int i = 1, x, y; i < N; i++) {
    scanf("%d %d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  if (X >= Y) {
    bool hall = false;
    for (int i = 1; i <= N; i++) {
      if (adj[i].size() == N - 1) {
        hall = true;
        break;
      }
    }
    long long ans = Y * (N - 2);
    if (hall) {
      ans += X;
    } else {
      ans += Y;
    }
    printf("%lld\n", ans);
    return 0;
  }
  while (adj[R].size() == 1) {
    R++;
  }
  dfs(R, 0);
  memset((dp), (-1), sizeof(dp));
  int nx = getdp(R, 0);
  int ny = N - 1 - nx;
  printf("%lld\n", nx * X + ny * Y);
}
