#include <bits/stdc++.h>
using namespace std;
vector<int> v[200005];
long long ret;
int n, x, y, cnt;
int num[200005];
int dfs(int u, int fa) {
  int sum = 0;
  for (int i = 0; i < v[u].size(); i++) {
    int nd = v[u][i];
    if (nd == fa) continue;
    sum += dfs(nd, u);
  }
  if (sum >= 2) {
    cnt += 2;
    return 0;
  }
  cnt += sum;
  return 1;
}
const bool cmp(const int a, const int b) { return num[a] > num[b]; }
int main() {
  while (scanf("%d%d%d", &n, &x, &y) != EOF) {
    int a, b;
    int ok = 0;
    ret = cnt = 0;
    for (int i = 1; i <= n; i++) num[i] = 0;
    for (int i = 0; i < n - 1; i++) {
      scanf("%d%d", &a, &b);
      v[a].push_back(b);
      v[b].push_back(a);
      num[a]++;
      num[b]++;
      if (num[a] == n - 1 || num[b] == n - 1) ok = 1;
    }
    for (int i = 1; i <= n; i++) {
      sort(v[i].begin(), v[i].end(), cmp);
    }
    if (y >= x) {
      dfs(1, -1);
      ret = (long long)cnt * (long long)x +
            (long long)(n - 1 - cnt) * (long long)y;
    } else {
      ret = (long long)(n - 2) * (long long)y;
      if (ok)
        ret += (long long)x;
      else
        ret += y;
    }
    printf("%I64d\n", ret);
  }
  return 0;
}
