#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 30;
vector<int> g[maxn];
bool mark[maxn];
int v[maxn];
void dfs(int cur, int pre) {
  v[cur] = 1;
  int tot = 0;
  for (int i = 0; i < g[cur].size(); i++) {
    int to = g[cur][i];
    if (to == pre) continue;
    dfs(to, cur);
    v[cur] += v[to];
    if (!mark[to]) tot++;
  }
  if (tot >= 2)
    v[cur] -= 2, mark[cur] = 1;
  else if (tot == 1)
    --v[cur];
}
int main() {
  int n, x, y;
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 1, u, v; i < n; ++i) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  if (x >= y) {
    for (int i = 1; i <= n; ++i)
      if (g[i].size() == n - 1)
        return 0 * printf("%lld\n", 1LL * (n - 2) * y + x);
    return 0 * printf("%lld\n", 1LL * (n - 1) * y);
  }
  dfs(1, 0);
  printf("%lld\n", 1LL * (v[1] - 1) * y + 1LL * (n - v[1]) * x);
  return 0;
}
