#include<iostream>
#include<utility>
#include<string>
#include<cstdio>
#include<cstring>
#include<stack>
#include<vector>

using namespace std;

template <class t1, class t2>
class Graph
{
	public:
	vector< pair<t1,t2> > node[200005];
	int height[200005], path_length[200005]; 
	bool visited[200005];
	stack<int> stk;

	void init()
	{
		memset(visited,false,200005);
		while(!stk.empty())
			stk.pop();
	}
	
	void add_edge(int u, int v, int w)
	{
		pair<t1,t2> p;
		p = make_pair(v,w);
		node[u].push_back(p);
	}
	
	void show_graph()
	{ 
		for(int i=0;i<10;i++)
		{
			int size = node[i].size();
			cout<<i<<" -> ";
			for(int j=0;j<size;j++)
				cout<<"("<<node[i][j].first<<','<<node[i][j].second<<")"<<" -> ";
			cout<<"x\n";
		}
	}
	
	long long dfs(int v)
	{
		int size;
	
		size = node[v].size();
		
		if(size==0)
		{
			height[v] = 1;
			path_length[v] = 1;
			return height[v];
		}
		if(size == 1)
		{
			 height[v] = 1 + dfs(node[v][1].first);
			 path_length[v] = height[v];
			 return height[v];
		}
		
		int temp = 0,temp1;
		height[v] = -1;
		int max1=1,max2=1;
		
		for(int j=0;j<size;j++)
		{	
			if(!visited[node[v][j].first])
			{	
				visited[node[v][j].first] = true;
				temp = dfs(node[v][j].first);
				if(height[v]<temp)
					height[v] = temp;
				if(max1<temp)
				{
					temp1 = max1;
					max1 = temp;
					max2 = temp1;
				}
			}
		}
		
		path_length[v] = max1 + max2 + 1;
		
		return height[v];
	}	
};	

int main()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(0);
	
	long long N,x,y,a,b;
	
	cin>>N>>x>>y;
	Graph<long long,long long> G;
	
	G.init();
	
	for(int i=0;i<N-1;i++)
	{
		cin>>a>>b;
		G.add_edge(a,b,x);
		G.add_edge(b,a,x);
	}
	
	if(x>=y)
	{
		bool flag = false;
		for(int i=1;i<=N;i++)
		{
			if(G.node[i].size()==(unsigned)(N-1))
			{
				flag = true;
				break;
			}
		}
		
		if(flag)
			cout<<(N-2)*y+x<<'\n';
		else
			cout<<(N-1)*y<<'\n';
	}
	else
	{	
		G.dfs(1);
		
		long long ans = -1;
		
		for(int i=1;i<=N;i++)
		{
			if(ans<G.path_length[i])
				ans = G.path_length[i];
		}
		
		ans--;
		
		cout<<ans*x + (N-1-ans)*y<<'\n';
	}
		
	return 0;
}
			
			
		
	
	
	
