#include <bits/stdc++.h>
using namespace std;
int f(vector<vector<int> > &G, int u, int *visited, int *available) {
  visited[u] = 1;
  int ans = 0, cnt = 0;
  for (auto it : G[u]) {
    if (not visited[it]) ans += f(G, it, visited, available);
    if (available[it]) cnt++;
  }
  if (cnt >= 2)
    ans += 2;
  else {
    available[u] = 1;
    ans += cnt;
  }
  return ans;
}
int main() {
  long long n, x, y;
  cin >> n >> x >> y;
  int u, v, cnt[n];
  vector<vector<int> > G(n);
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < n - 1; ++i) {
    cin >> u >> v;
    cnt[u - 1]++;
    cnt[v - 1]++;
    G[u - 1].push_back(v - 1);
    G[v - 1].push_back(u - 1);
  }
  if (x > y) {
    int i;
    for (i = 0; i < n; ++i) {
      if (cnt[i] == n - 1) break;
    }
    if (i == n)
      cout << (long long)(n - 1) * y;
    else
      cout << (n - 2) * y + x;
    cout << '\n';
  } else {
    int visited[n], available[n];
    memset(visited, 0, sizeof(visited));
    memset(available, 0, sizeof(available));
    int res = f(G, 0, visited, available);
    cout << res * x + (n - 1 - res) * y << '\n';
  }
  return 0;
}
