#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll n, x, y;
vector<vector<int>> g;
int dfs(int node, int par, int &ans) {
  int left = 2;
  for (int next : g[node]) {
    if (next == par) continue;
    int x = dfs(next, node, ans);
    if (left > 0 && x == 1) {
      ans++;
      left--;
    }
  }
  return left > 0 ? 1 : 0;
}
int minimumCover() {
  int ans = 0;
  dfs(0, -1, ans);
  return ans;
}
int main() {
  while (cin >> n >> x >> y) {
    g.assign(n, {});
    for (int i = 0; i < n - 1; i++) {
      int a, b;
      cin >> a >> b;
      --a, --b;
      g[a].emplace_back(b);
      g[b].emplace_back(a);
    }
    if (x < y) {
      int ans = minimumCover();
      int cover = n - ans;
      cout << (cover - 1) * y + (n - 1 - cover + 1) * x << endl;
    } else {
      int md = 0;
      for (int i = 0; i < n; i++) {
        md = max<int>(md, g[i].size());
      }
      if (md == n - 1) {
        cout << y * (n - 2) + x << endl;
      } else {
        cout << y * (n - 1) << endl;
      }
    }
  }
}
