import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        } int i = 0; int i = 0; i 0 i <= Math.max(x*2, y*2) i Math.max(x*2, y*2) Math.max Math x*2 x 2 y*2 y 2 i+=2 i+=2 i 2 {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        } {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        } long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2)); tmp c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2)) c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2)) c*i c i a*(Math.max(0,x-i/2)) a (Math.max(0,x-i/2)) Math.max Math 0 x-i/2 x i/2 i 2 b*(Math.max(0,y-i/2)) b (Math.max(0,y-i/2)) Math.max Math 0 y-i/2 y i/2 i 2 ans = Math.min(tmp, ans) ans Math.min(tmp, ans) Math.min Math tmp ans System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        long ans = Long.MAX_VALUE;

        for (int i = 0; i <= Math.max(x*2, y*2); i+=2) {
          long tmp = c*i + a*(Math.max(0,x-i/2)) + b*(Math.max(0,y-i/2));
          ans = Math.min(tmp, ans);   
        }

        System.out.println(ans);
        sc.close();
    }
}