#include <bits/stdc++.h>
using namespace std;
int n, cnt[200009];
long long x, y, ans;
vector<int> v[200009];
void dfs(int node, int parent) {
  for (auto i : v[node]) {
    if (i != parent) dfs(i, node), cnt[node]++;
  }
  if (cnt[node] > 1) {
    ans += cnt[node] - 1;
    cnt[parent]--;
  } else if (node == 1 && cnt[node] < 2)
    ans++;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> x >> y;
  int mx = 0;
  for (int i = 1; i < n; i++) {
    int u, uu;
    cin >> u >> uu;
    v[u].push_back(uu), v[uu].push_back(u);
    mx = max(mx, (int)v[u].size());
    mx = max(mx, (int)v[uu].size());
  }
  dfs(1, 0);
  ans--;
  if (x >= y) return cout << (mx < n - 1 ? y * (n - 1) : y * (n - 2) + x), 0;
  cout << (n - 1 - ans) * x + ans * y;
}
