

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main{

	public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main{

	public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	}

} Main public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	} main {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter wr = new PrintWriter(System.out); wr new PrintWriter(System.out) String str = br.readLine().trim(); str br.readLine().trim() br.readLine().trim br.readLine() br.readLine br StringTokenizer stk = new StringTokenizer(str); stk new StringTokenizer(str) int A = Integer.parseInt(stk.nextToken()); A Integer.parseInt(stk.nextToken()) Integer.parseInt Integer stk.nextToken() stk.nextToken stk int B = Integer.parseInt(stk.nextToken()); B Integer.parseInt(stk.nextToken()) Integer.parseInt Integer stk.nextToken() stk.nextToken stk int C = Integer.parseInt(stk.nextToken()); C Integer.parseInt(stk.nextToken()) Integer.parseInt Integer stk.nextToken() stk.nextToken stk int X = Integer.parseInt(stk.nextToken()); X Integer.parseInt(stk.nextToken()) Integer.parseInt Integer stk.nextToken() stk.nextToken stk int Y = Integer.parseInt(stk.nextToken()); Y Integer.parseInt(stk.nextToken()) Integer.parseInt Integer stk.nextToken() stk.nextToken stk long first=0l first 0l second=0l second 0l third = 0l; third 0l first = (long)A*X+B*Y first (long)A*X+B*Y (long)A*X (long)A X B*Y B Y if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        } X>Y X Y {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        } int left = X-Y; left X-Y X Y second = (long)Y*2*C second (long)Y*2*C (long)Y*2*C (long)Y 2 C second+=left*A second left*A left A {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        } int left = Y-X; left Y-X Y X second = (long)X*2*C second (long)X*2*C (long)X*2*C (long)X 2 C second+=left*B second left*B left B if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C; X>Y X Y third = (long)(X+X)*C third (long)(X+X)*C (long)(X+X) X X C third = (long)(Y+Y)*C third (long)(Y+Y)*C (long)(Y+Y) Y Y C System.out.println(Math.min(first, Math.min(second, third))) System.out.println System.out System System.out Math.min(first, Math.min(second, third)) Math.min Math first Math.min(second, third) Math.min Math second third String[] args args public class Main{

	public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	}

} public class Main{

	public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	}

} Main


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main{

	public static void main(String[] args) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter wr = new PrintWriter(System.out);
        String str = br.readLine().trim();
        StringTokenizer stk = new StringTokenizer(str);
        int A = Integer.parseInt(stk.nextToken());
        int B = Integer.parseInt(stk.nextToken());
        int C = Integer.parseInt(stk.nextToken());
        int X = Integer.parseInt(stk.nextToken());
        int Y = Integer.parseInt(stk.nextToken());
        long first=0l,second=0l,third = 0l;
        first = (long)A*X+B*Y;
        //System.out.println(Math.min(A, B)+Math.min(C,D));
        if(X>Y) {
        	int left = X-Y;
        	second = (long)Y*2*C;second+=left*A;
        }
        else {
        	int left = Y-X;
        	second = (long)X*2*C;second+=left*B;
        }
        if(X>Y)third = (long)(X+X)*C;
        else third = (long)(Y+Y)*C;
        System.out.println(Math.min(first, Math.min(second, third)));
	}

}
