#include <bits/stdc++.h>
using namespace std;
struct nod {
  long long qian, lian;
} bian[410000];
long long ans, x, y, wei[210000], p, fa[210000], num[210000], dp[210000][4], i,
    n, a, b;
void build(long long a, long long b) {
  p++;
  bian[p].qian = wei[a];
  bian[p].lian = b;
  wei[a] = p;
}
void search(long long d) {
  long long all = 0, w;
  for (w = wei[d]; w; w = bian[w].qian)
    if (bian[w].lian != fa[d]) {
      fa[bian[w].lian] = d;
      search(bian[w].lian);
      dp[d][0] += max(dp[bian[w].lian][0],
                      max(dp[bian[w].lian][1], dp[bian[w].lian][2]));
      if (max(dp[bian[w].lian][0], dp[bian[w].lian][1]) >= dp[bian[w].lian][2])
        all++;
    }
  if (all >= 1) dp[d][1] = dp[d][0] + 1;
  if (all >= 2) dp[d][2] = dp[d][0] + 2;
}
int main() {
  scanf("%lld%lld%lld", &n, &x, &y);
  for (i = 1; i < n; i++) {
    scanf("%lld%lld", &a, &b);
    build(a, b);
    build(b, a);
    num[a]++;
    num[b]++;
  }
  if (x >= y) {
    for (i = 1; i <= n; i++)
      if (num[i] == n - 1) {
        printf("%lld\n", (n - 2) * y + x);
        return 0;
      }
    printf("%lld\n", (n - 1) * y);
    return 0;
  }
  search(1);
  ans = max(dp[1][0], max(dp[1][1], dp[1][2]));
  printf("%lld\n", ans * x + y * (n - 1 - ans));
}
