#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
const long long INF = 1e18;
int n, cnt;
long long x, y;
vector<int> g[MAX];
int dfs(int u, int p = -1) {
  if (g[u].size() == 1 && p != -1) return 1;
  int s = 0;
  for (int v : g[u])
    if (v != p) s += dfs(v, u);
  if (s == 0) return 1;
  if (s == 1) {
    cnt++;
    return 1;
  }
  cnt += 2;
  return 0;
}
int main() {
  scanf("%d%I64d%I64d", &n, &x, &y);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  int st = 0;
  for (int i = 1; i <= n; i++)
    if ((int)g[i].size() == n - 1) st = 1;
  if (y < x) {
    long long ans = x + (n - 2) * y;
    if (!st) {
      ans -= x;
      ans += y;
    }
    printf("%I64d\n", ans);
    return 0;
  }
  dfs(1);
  long long ans = cnt * x + (n - 1 - cnt) * y;
  printf("%I64d\n", ans);
  return 0;
}
