#include <bits/stdc++.h>
const int INF = 0x3fffffff;
using namespace std;
int n, r;
vector<int> vv[200005];
int fun(int cur, int pre) {
  int i, l = vv[cur].size(), t = 0, v;
  for (i = 0; i < l; i++) {
    v = vv[cur][i];
    if (v != pre) {
      t += fun(v, cur);
    }
  }
  if (cur == pre) {
    if (t < 3) return 0;
    r += t - 2;
    return 0;
  }
  if (t < 2) return 1;
  r += t - 1;
  return 0;
}
int main() {
  int i, j, k, u, v;
  int n, x, y;
  long long ans;
  scanf("%d%d%d", &n, &x, &y);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    vv[u].push_back(v);
    vv[v].push_back(u);
  }
  if (x > y) {
    ans = 1ll * y * (n - 1);
    for (i = 1; i <= n; i++)
      if (vv[i].size() == n - 1) break;
    if (i <= n) ans += (long long)(x - y);
  } else if (x == y) {
    ans = 1ll * y * (n - 1);
  } else {
    fun(1, 1);
    ans = 1ll * r * y + 1ll * x * (n - r - 1);
  }
  printf("%I64d", ans);
  return 0;
}
