#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
bool been[MAXN];
vector<int> p[MAXN];
int dp[MAXN][2];
int delta[MAXN];
void DFS(int v, int father) {
  been[v] = false;
  int Sum0 = 0;
  for (int i = 0; i < p[v].size(); i++) {
    int u = p[v][i];
    if (u != father) {
      DFS(u, v);
      Sum0 += dp[u][0];
    }
  }
  int ds = 0;
  for (int i = 0; i < p[v].size(); i++) {
    int u = p[v][i];
    if (u != father) {
      ds++;
      delta[ds] = dp[u][1] - dp[u][0];
    }
  }
  if (ds != 0) {
    sort(delta + 1, delta + ds + 1);
    dp[v][1] = max(Sum0, Sum0 + delta[ds]) + 1;
    dp[v][0] = max(Sum0, Sum0 + delta[ds]);
    if (ds > 1) {
      dp[v][0] = max(dp[v][0], Sum0 + delta[ds] + delta[ds - 1]);
    }
  } else {
    dp[v][0] = 0;
    dp[v][1] = 1;
  }
}
int main() {
  int N;
  long long x, y;
  cin >> N >> x >> y;
  for (int i = 1; i < N; i++) {
    int a, b;
    cin >> a >> b;
    p[a].push_back(b);
    p[b].push_back(a);
  }
  if (x > y) {
    bool blocked = false;
    for (int i = 1; i <= N; i++) {
      if (p[i].size() == N - 1) blocked = true;
    }
    if (blocked) {
      cout << (long long)(N - 2) * y + x << endl;
    } else {
      cout << (long long)(N - 1) * y << endl;
    }
  } else {
    DFS(1, 0);
    cout << (long long)dp[1][0] * x + (long long)(N - 1 - dp[1][0]) * y << endl;
  }
  return 0;
}
