import std.algorithm;
import std.conv;
import std.stdio;
import std.string;

void main()
{
	auto abcxy = readln.split.map!( to!int );
	writeln( solve( abcxy[ 0 ], abcxy[ 1 ], abcxy[ 2 ], abcxy[ 3 ], abcxy[ 4 ] ) );
}

int solve( in int a, in int b, in int c, in int x, in int y )
{
	auto cc = c * 2;
	
	if( a + b < cc ) return ( a * x ) + ( b * y );
	
	if( x < y )
	{
		if( b < cc ) return ( cc * x ) + ( b  * ( y - x ) );
		else         return ( cc * x ) + ( cc * ( y - x ) );
	}
	else
	{
		if( a < cc ) return ( cc * y ) + ( a  * ( x - y ) );
		else         return ( cc * y ) + ( cc * ( x - y ) );
	}
}

unittest
{
	assert( solve( 1500, 2000, 1600, 3, 2 ) == 7900 );
	assert( solve( 1500, 2000, 1900, 3, 2 ) == 8500 );
	assert( solve( 1500, 2000, 500, 90000, 100000 ) == 100000000 );
}
