#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
const int M = 100 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
vector<int> edge[N];
int n, x, y, cnt;
bool dfs(int u, int p) {
  int deg = 2;
  for (int v : edge[u]) {
    if (v == p) continue;
    if (dfs(v, u) && deg > 0) {
      cnt++;
      deg--;
    }
  }
  return deg > 0;
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  long long ans = 0;
  if (x < y) {
    dfs(1, -1);
    ans = 1ll * cnt * x + 1ll * (n - cnt - 1) * y;
  } else {
    bool flag = false;
    for (int i = 1; i <= n; i++) {
      if (edge[i].size() == n - 1) flag = true;
    }
    if (flag) {
      ans = 1ll * x + 1ll * (n - 2) * y;
    } else {
      ans = 1ll * (n - 1) * y;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
