#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 9;
long long x, y, n, k, ans;
vector<int> g[MAX];
int dfs(int v, int p = -1) {
  int s = 0;
  for (auto u : g[v])
    if (u != p) s += dfs(u, v);
  if (!s)
    return 1;
  else if (s == 1)
    return ans++, 1;
  return ans += 2, 0;
}
int main() {
  cin >> n >> x >> y;
  for (int i = 0, v, u; i < n - 1; i++) {
    cin >> v >> u, v--, u--, g[v].push_back(u), g[u].push_back(v);
    k += (g[v].size() == n - 1) + (g[u].size() == n - 1);
  }
  if (x <= y)
    dfs(0), cout << (n - ans - 1) * y + ans * x;
  else if (!k)
    cout << (n - 1) * y;
  else
    cout << (n - 2) * y + x;
}
