#include <bits/stdc++.h>
using namespace std;
int n;
int dp[210000][3];
int a[210000];
vector<int> v[210000];
void dfs(int x, int pre) {
  int i, j, k;
  for (i = 0; i < v[x].size(); i++) {
    if (v[x][i] == pre)
      continue;
    else
      dfs(v[x][i], x);
  }
  int u = 0, z = 0, tmp = 0;
  for (i = 0; i < v[x].size(); i++) {
    int u = v[x][i];
    if (u == pre) continue;
    int t1 = max(dp[u][0], dp[u][1]);
    int t2 = max(t1, dp[u][2]);
    int t3 = max(t1, t2);
    int cur = x;
    dp[cur][2] = max(dp[cur][2] + t3, dp[cur][1] + t1 + 1);
    dp[cur][1] = max(dp[cur][1] + t3, dp[cur][0] + t1 + 1);
    dp[cur][0] += t3;
  }
}
int find1() {
  int flag = 0;
  int i;
  for (i = 1; i <= n; i++) {
    if (v[i].size() == n - 1) return 0;
  }
  return 1;
}
int main() {
  int x, y;
  while (cin >> n >> x >> y) {
    int i, j;
    for (i = 0; i <= n; i++) {
      for (j = 0; j <= 2; j++) {
        dp[i][j] = 0;
      }
    }
    for (i = 0; i <= n; i++) v[i].clear();
    int p, q;
    for (i = 1; i < n; i++) {
      scanf("%d %d", &p, &q);
      v[p].push_back(q);
      v[q].push_back(p);
    }
    if (x >= y) {
      if (find1())
        printf("%I64d\n", (long long)y * (n - 1));
      else
        printf("%I64d\n", (long long)y * (n - 2) + x);
      continue;
    }
    dfs(1, 0);
    int ans = 0;
    for (i = 0; i <= 2; i++) {
      ans = max(ans, dp[1][i]);
    }
    printf("%I64d\n", (long long)x * (long long)ans +
                          (long long)(n - 1 - ans) * (long long)y);
  }
}
