#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int temp;
  while (b > 0) {
    temp = b;
    b = a % b;
    a = temp;
  }
  return a;
}
long long int maxm;
vector<int> adj[200100];
bool vis[200100];
int level[200100];
bool used_node[200100];
int bfs(int node) {
  maxm = 0;
  int d_node;
  memset(level, 0, sizeof(level));
  memset(vis, false, sizeof(vis));
  queue<int> que;
  que.push(node);
  while (!que.empty()) {
    int v = que.front();
    que.pop();
    vis[v] = true;
    int len = adj[v].size();
    for (int i = 0; i < len; i++) {
      int u = adj[v][i];
      if (vis[u] == false) {
        que.push(u);
        level[u] = level[v] + 1;
        if (level[u] >= maxm) {
          d_node = u;
          maxm = level[u];
        }
      }
    }
  }
  return d_node;
}
int X_edges = 0;
int dfs(int node) {
  int node_rem_edges = 2;
  vis[node] = true;
  int len = adj[node].size();
  for (int i = 0; i < len; i++) {
    int u = adj[node][i];
    if (vis[u] == false) {
      int from_child = dfs(u);
      if (node_rem_edges > 0 && from_child > 0) {
        node_rem_edges--;
        X_edges++;
      }
    }
  }
  return node_rem_edges;
}
int main() {
  int u, v;
  long long int V, X, Y, ans;
  cin >> V >> X >> Y;
  for (int i = 1; i < V; i++) {
    scanf("%d", &u);
    scanf("%d", &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (X >= Y) {
    int d_node1 = bfs(1);
    bfs(d_node1);
    if (maxm <= 2) {
      ans = Y * (V - 2) + X;
    } else {
      ans = Y * (V - 1);
    }
  } else {
    dfs(1);
    ans = X_edges * X + (V - X_edges - 1) * Y;
  }
  cout << ans << endl;
  return 0;
}
