#include <bits/stdc++.h>
using namespace std;
long long n, x, y, ans, a, b, si[200005], res, cnt = 0;
bool done[200005];
vector<long long> adj[200005];
long long dfs(long long a, long long par) {
  long long deg = 2;
  for (auto e : adj[a]) {
    if (e == par) continue;
    if (dfs(e, a) && deg) {
      cnt++;
      deg--;
    }
  }
  return deg > 0;
}
int main() {
  long long i, j, k;
  ios::sync_with_stdio(0);
  cin >> n >> x >> y;
  for (i = 1; i <= n - 1; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  if (x > y) {
    ans = y * (n - 1);
    for (i = 1; i <= n; i++)
      if (adj[i].size() == n - 1) {
        ans = ans - y + x;
        break;
      }
  }
  if (x <= y) {
    dfs(1, -1);
    res = (cnt)*x + (n - 1 - cnt) * y;
    ans = res;
  }
  cout << ans << endl;
  return 0;
}
