#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using Pii = pair<int, int>;
constexpr int MAX = 1000100;
constexpr int INF = 0x3F3F3F3F;
vector<int> adj[MAX];
int dp[MAX][3];
void Dfs(int x, int pre) {
  dp[x][0] = 0;
  dp[x][1] = -INF;
  dp[x][2] = -INF;
  int d1 = -INF, d2 = -INF;
  for (const auto& y : adj[x]) {
    if (y == pre) continue;
    Dfs(y, x);
    int cur = max(dp[y][0], max(dp[y][1], dp[y][2]));
    int u = 1 + (dp[y][2] == cur ? max(dp[y][0], dp[y][1]) - dp[y][2] : 0);
    dp[x][0] += cur;
    if (d1 < u) {
      d2 = d1;
      d1 = u;
    } else if (d1 == u) {
      d2 = u;
    }
  }
  if (d1 > -INF) dp[x][1] = dp[x][0] + d1;
  if (d1 + d2 > -INF) dp[x][2] = dp[x][0] + d1 + d2;
}
i64 Solve(int n, int x, int y) {
  if (x >= y) {
    for (int i = 0; i < n; ++i) {
      if ((int)adj[i].size() == n - 1) {
        return (i64)y * (i64)(n - 2) + (i64)x;
      }
    }
    return (i64)y * (i64)(n - 1);
  }
  Dfs(0, -1);
  int l = max(dp[0][0], max(dp[0][1], dp[0][2]));
  return (i64)l * (i64)x + (i64)(n - 1 - l) * (i64)y;
}
int main() {
  int n, x, y;
  while (~scanf("%d%d%d", &n, &x, &y)) {
    for (int i = 0; i < n; ++i) adj[i].clear();
    int a, b;
    for (int i = 1; i < n; ++i) {
      scanf("%d%d", &a, &b);
      adj[a - 1].push_back(b - 1);
      adj[b - 1].push_back(a - 1);
    }
    cout << Solve(n, x, y) << endl;
  }
  return 0;
}
