#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int n, x, y, freq[N], temp;
long long ans;
bool bad;
vector<int> g[N];
void dfs(int u, int p) {
  for (auto i : g[u])
    if (i != p) {
      dfs(i, u);
      if (freq[u] != 2 && freq[i] != 2) {
        freq[u]++;
        temp++;
      }
    }
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  ans = y * (n - 1LL);
  for (int i = 1, a, b; i < n; i++) {
    scanf("%d%d", &a, &b);
    g[--a].push_back(--b);
    g[b].push_back(a);
    if (g[a].size() == n - 1 || g[b].size() == n - 1) bad = 1;
  }
  dfs(0, -1);
  ans = min(ans, (n - 1LL - temp) * y + temp * 1LL * x);
  if (bad && x > y) ans = x + (n - 2LL) * y;
  printf("%lld\n", ans);
}
