#include <bits/stdc++.h>
using namespace std;
vector<int> graph[200005];
int dp[200005][2];
void go(int now, int from) {
  if (graph[now].size() == 1 && from != -1) {
    dp[now][0] = 0;
    dp[now][1] = 0;
    return;
  }
  int ans0, ans1 = -1, sum = -1, i, tot = 0;
  for (i = 0; i < graph[now].size(); i++) {
    int to = graph[now][i];
    if (to == from) continue;
    tot++;
    go(to, now);
    if (sum == -1) {
      sum = dp[to][1];
      ans0 = dp[to][0];
    } else {
      if (ans1 == -1) {
        ans1 = ans0 + dp[to][0];
      } else {
        ans1 = min(ans1 + dp[to][1], ans0 + dp[to][0]);
      }
      ans0 = min(sum + dp[to][0], ans0 + dp[to][1]);
      sum += dp[to][1];
    }
  }
  if (ans1 == -1) {
    dp[now][0] = dp[now][1] = min(sum + tot, ans0 + tot - 1);
    return;
  }
  dp[now][0] = min(sum + tot, ans0 + tot - 1);
  dp[now][1] = min(dp[now][0], ans1 + tot - 2);
  return;
}
int main() {
  int n, x, y, i;
  scanf("%d", &n);
  scanf("%d", &x);
  scanf("%d", &y);
  for (i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d", &a);
    scanf("%d", &b);
    a--;
    b--;
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  if (y <= x) {
    for (i = 0; i < n; i++) {
      if (graph[i].size() == n - 1) {
        long long temp = n - 2;
        temp *= y;
        cout << temp + x << endl;
        return 0;
      }
    }
    long long temp = n - 1;
    temp *= y;
    cout << temp << endl;
    return 0;
  }
  int st = 0;
  go(st, -1);
  long long ans1 = dp[st][1], ans2 = (n - 1 - dp[st][1]);
  ans1 *= y;
  ans2 *= x;
  cout << ans1 + ans2 << endl;
  return 0;
}
