#include <bits/stdc++.h>
using namespace std;
long long i, j, k, l, m, n, num, p, q1, x, y, h, t, ans;
long long q[210000], d[210000], first[210000], sum[210000], f[210000];
struct info {
  long long come, next;
} a[420000];
void add(long x, long y) {
  num++;
  a[num].come = y;
  a[num].next = first[x];
  first[x] = num;
}
int dfs(int u, int p) {
  int left = 2;
  for (int i = first[u]; i != 0; i = a[i].next) {
    int v = a[i].come;
    if (v == p) continue;
    int x = dfs(v, u);
    if (left > 0 && x == 1) {
      ans++;
      left--;
    }
  }
  return left > 0 ? 1 : 0;
}
int main() {
  scanf("%I64d%I64d%I64d", &n, &x, &y);
  for (i = 1; i < n; i++) {
    scanf("%I64d%I64d", &p, &q1);
    add(p, q1);
    add(q1, p);
    sum[p]++;
    sum[q1]++;
  }
  if (x < y) {
    dfs(1, -1);
    ans = ans * x + (n - 1 - ans) * y;
    printf("%I64d", ans);
  } else {
    k = 0;
    for (i = 1; i <= n; i++)
      if (sum[i] == n - 1) {
        k = 1;
        break;
      }
    long long ans = k * x + (n - 1 - k) * y;
    printf("%I64d", ans);
  }
}
