#include <bits/stdc++.h>
using namespace std;
const int N_ = 200500;
int N;
long long X, Y;
vector<int> gph[N_];
long long ans = (long long)1e18;
int solve(int u, int p, int &x) {
  int ch = 0;
  for (auto v : gph[u]) {
    if (v == p) continue;
    ch += solve(v, u, x);
  }
  if (ch >= 2) {
    x += (p > 0) ? (ch - 1) : (ch - 2);
    return 0;
  } else {
    return 1;
  }
}
int main() {
  scanf("%d%I64d%I64d", &N, &X, &Y);
  for (int e = 1; e < N; e++) {
    int u, v;
    scanf("%d%d", &u, &v);
    gph[u].push_back(v);
    gph[v].push_back(u);
  }
  {
    if (X < Y) {
      int y = 0;
      solve(1, -1, y);
      int x = N - 1 - y;
      ans = X * x + Y * y;
    } else if (X >= Y) {
      ans = Y * (N - 1);
      for (int u = 1; u <= N; u++) {
        if (gph[u].size() == N - 1) ans = Y * (N - 2) + X;
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
