#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, x, y;
vector<int> e[200005];
long long f[200005][3];
int min3(int a, int b, int c) { return min(min(a, b), c); }
void dp(int x, int fa) {
  for (int i = 0; i < e[x].size(); i++) {
    int y = e[x][i];
    if (y != fa) {
      dp(y, x);
      long long g0 = f[x][0], g1 = f[x][1], g2 = f[x][2];
      f[x][0] = min(g1 + f[y][1], g0 + min3(f[y][0], f[y][1], f[y][2]) + 1);
      f[x][1] = g1 + min3(f[y][0], f[y][1], f[y][2]) + 1;
      f[x][1] = min(f[x][1], g2 + f[y][1]);
      f[x][2] = g2 + min3(f[y][0], f[y][1], f[y][2]) + 1;
    }
  }
}
int main() {
  n = read();
  x = read();
  y = read();
  for (int i = 1; i <= n - 1; i++) {
    int u = read(), v = read();
    e[u].push_back(v);
    e[v].push_back(u);
  }
  if (x >= y) {
    for (int i = 1; i <= n; i++)
      if (e[i].size() == n - 1) {
        cout << (long long)(n - 2) * y + x;
        return 0;
      }
    cout << (long long)(n - 1) * y;
    return 0;
  }
  dp(1, 0);
  long long ans = 1000000000;
  for (int i = 0; i < 2; i++) ans = min(ans, f[1][i]);
  cout << ans * y + (n - 1 - ans) * x;
  return 0;
}
