#include <bits/stdc++.h>
using namespace std;
template <class C>
void mini(C& a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C& a4, C b4) {
  a4 = max(a4, b4);
}
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> pair) {
  return out << "(" << pair.first << ", " << pair.second << ")";
}
const int N = 220000;
struct node {
  vector<int> edges;
  int parent;
  int res[3];
};
node tree[N];
void DFS(int x) {
  vector<int> values;
  int total = 0;
  for (int q : tree[x].edges) {
    if (q == tree[x].parent) continue;
    tree[q].parent = x;
    DFS(q);
    total += tree[q].res[2];
    values.push_back(1 + tree[q].res[1] - tree[q].res[2]);
  }
  sort(values.begin(), values.end(), greater<int>());
  if (((int)(values).size()) >= 1) total += values[0];
  tree[x].res[1] = total;
  if (((int)(values).size()) >= 2) total += values[1];
  tree[x].res[2] = total;
};
int main() {
  int n;
  long long x, y;
  scanf("%d", &n);
  scanf("%I64d %I64d", &x, &y);
  for (int i = 0; i < (n - 1); ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--;
    b--;
    tree[a].edges.push_back(b);
    tree[b].edges.push_back(a);
  }
  if (x < y) {
    tree[0].parent = -1;
    DFS(0);
    printf("%I64d\n",
           ((long long)(n - 1)) * y + ((long long)tree[0].res[2]) * (x - y));
    return 0;
  } else {
    int maxdeg = 0;
    for (int i = 0; i < (n); ++i) {
      if (((int)(tree[i].edges).size()) > maxdeg)
        maxdeg = ((int)(tree[i].edges).size());
    };
    if (maxdeg == n - 1) {
      printf("%I64d\n", ((long long)(n - 2)) * y + x);
    } else {
      printf("%I64d\n", ((long long)(n - 1)) * y);
    };
  };
  return 0;
}
