#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 2e5 + 1;
int par[1];
int find(int x) { return x == par[x] ? x : par[x] = find(par[x]); }
void join(int x, int y) { par[find(x)] = y; }
long long expo(long long a, long long b, long long mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b, long long& x, long long& y) {
  if (!a) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
int dp[4][N];
vector<int> tree[N];
void dfs(int v, int p) {
  int i, u, sum = 0;
  for (i = 0; i < tree[v].size(); ++i) {
    u = tree[v][i];
    if (u != p) {
      dfs(u, v);
    }
    sum += dp[3][u];
  }
  dp[0][v] = sum;
  int mx, mx1 = INT_MIN, mx2 = INT_MIN;
  for (i = 0; i < tree[v].size(); ++i) {
    u = tree[v][i];
    if (u != p) {
      mx = -dp[3][u] + 1 + max(dp[0][u], dp[1][u]);
      if (mx1 == INT_MIN) {
        mx1 = mx;
      } else {
        if (mx1 < mx) {
          mx2 = mx1;
          mx1 = mx;
        } else {
          if (mx2 == INT_MIN) {
            mx2 = mx;
          } else {
            mx2 = max(mx2, mx);
          }
        }
      }
    }
  }
  if (mx1 != INT_MIN) {
    dp[1][v] = sum + mx1;
  }
  if (mx1 != INT_MIN && mx2 != INT_MIN) {
    dp[2][v] = sum + mx1 + mx2;
  }
  dp[3][v] = max(max(dp[0][v], dp[1][v]), dp[2][v]);
}
int main() {
  int n, x, y, i, u, v, c = 0, store = -1;
  scanf("%d%d%d", &n, &x, &y);
  for (i = 1; i < n; ++i) {
    scanf("%d%d", &u, &v);
    tree[u].push_back(v);
    tree[v].push_back(u);
  }
  if (x > y) {
    for (i = 1; i <= n; ++i) {
      if (tree[i].size() == 1) {
        ++c;
      } else {
        store = i;
      }
    }
    if ((n <= 3) ||
        (store != -1 && c == n - 1 && tree[store].size() == n - 1)) {
      printf("%lld\n", 1LL * (n - 2) * y + x);
    } else {
      printf("%lld\n", 1LL * (n - 1) * y);
    }
  } else {
    dfs(1, 0);
    printf("%lld\n", 1LL * (x - y) * dp[3][1] + 1LL * y * (n - 1));
  }
  return 0;
}
