#include <bits/stdc++.h>
using namespace std;
inline int min(int _a, int _b) { return _a < _b ? _a : _b; }
inline int max(int _a, int _b) { return _a > _b ? _a : _b; }
template <class _T>
inline void rd(_T &_a) {
  int _f = 0, _ch = getchar();
  _a = 0;
  while (_ch < '0' || _ch > '9') {
    if (_ch == '-') _f = 1;
    _ch = getchar();
  }
  while (_ch >= '0' && _ch <= '9') _a = _a * 10 + _ch - '0', _ch = getchar();
  if (_f) _a = -_a;
}
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
const int N = 2e5 + 5;
struct node {
  int v, nt;
} e[N << 1];
int h[N], ans, r[N];
bool dfs(int u, int fa) {
  int f = 2;
  for (int i = h[u], v; i; i = e[i].nt) {
    v = e[i].v;
    if (v != fa && dfs(v, u) && f) f--, ans++;
  }
  return !!f;
}
int main() {
  int n, x, y;
  rd(n);
  rd(x);
  rd(y);
  for (int i = 1, u, v; i < n; i++)
    rd(u), rd(v), e[i << 1] = (node){v, h[u]}, h[u] = i << 1,
                         e[i << 1 | 1] = (node){u, h[v]}, h[v] = i << 1 | 1,
                         r[u]++, r[v]++;
  if (y <= x) {
    int mx = 0;
    for (int i = 1; i <= n; i++) mx = max(mx, r[i]);
    printf("%I64d", (long long)y * (n - 1) + (mx == n - 1 ? x - y : 0));
  } else {
    dfs(1, 0);
    printf("%I64d", (long long)ans * x + (long long)y * (n - 1 - ans));
  }
  return 0;
}
