#include <bits/stdc++.h>
using namespace std;
const int maxN = (int)2E5 + 5;
int n, x, y;
vector<int> Adj[maxN];
int deg[maxN];
bool avail[maxN];
bool marked[maxN];
int Count[maxN];
int DFS(int u) {
  marked[u] = true;
  Count[u] = 0;
  int cnt = 0;
  for (int i = 0, sz = Adj[u].size(); i < sz; ++i) {
    int v = Adj[u][i];
    if (marked[v]) continue;
    DFS(v);
    Count[u] += Count[v];
    if (avail[v]) ++cnt;
  }
  if (cnt == 0)
    avail[u] = true;
  else if (cnt == 1)
    avail[u] = true, ++Count[u];
  else
    avail[u] = false, Count[u] += 2;
  return Count[u];
}
int main() {
  scanf("%d %d %d", &n, &x, &y);
  for (int u = 1; u <= n; ++u) Adj[u].clear();
  memset(deg, 0, sizeof(deg));
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    Adj[u].push_back(v);
    Adj[v].push_back(u);
    ++deg[u];
    ++deg[v];
  }
  if (x >= y) {
    for (int u = 1; u <= n; ++u)
      if (deg[u] == n - 1) {
        cout << (long long)(n - 2) * y + x << endl;
        return 0;
      }
    cout << (long long)(n - 1) * y << endl;
    return 0;
  }
  DFS(1);
  memset(marked, false, sizeof(marked));
  cout << (long long)Count[1] * x + (long long)(n - 1 - Count[1]) * y << endl;
  return 0;
}
