import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
     	int AB = sc.nextInt();
		int X = sc.nextInt();
      	int Y = sc.nextInt();
      	
        Long sum = (long) 0;
      	if(2*AB>=(A+B)){
          	sum = (long) (A*X+B*Y);
      		System.out.println(sum);
          	return;
        }
      
      	int min = X;
      	int max = Y;
      	int addpizza = B; 
      	
      	if(Y<X){
        	min = Y;
          	max = X;
          	addpizza = A; 
        }
      
        Long sum2 = (long) (2*AB*max);
      	sum = (long) (addpizza*(max-min)+2*(AB*min));
      	if(sum<sum2){
      		System.out.println(sum);
        }else{
          System.out.println(sum2);
        }
        return;
	}
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz