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 c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} import java.util.*; util.* java public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    } main {
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b))); x>=y x y System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a))) System.out.println System.out System System.out Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)) Math.min Math a*x+b*y a*x a x b*y b y Math.min(2*c*x,2*c*y+(x-y)*a) Math.min Math 2*c*x 2*c*x 2 c x 2*c*y+(x-y)*a 2*c*y 2*c*y 2 c y (x-y)*a (x-y) x y a System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b))) System.out.println System.out System System.out Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)) Math.min Math a*x+b*y a*x a x b*y b y Math.min(2*c*y,2*c*x+(y-x)*b) Math.min Math 2*c*y 2*c*y 2 c y 2*c*x+(y-x)*b 2*c*x 2*c*x 2 c x (y-x)*b (y-x) y x b String[] args args public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    } lcm {
      return x*y/gcd(x,y);
    } return x*y/gcd(x,y); x*y/gcd(x,y) x*y x y gcd(x,y) gcd x y int x x int y y public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    } gcd {
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    } if(x < y)return gcd(y,x); x < y x y return gcd(y,x); gcd(y,x) gcd y x if(y==0)return x; y==0 y 0 return x; x return gcd(y,x%y); gcd(y,x%y) gcd y x%y x y int x x int y y public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} public class Main{   
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
} Main
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 c = sc.nextInt();
      int x = sc.nextInt();
      int y = sc.nextInt();
      if(x>=y)System.out.println(Math.min(a*x+b*y,Math.min(2*c*x,2*c*y+(x-y)*a)));
      else System.out.println(Math.min(a*x+b*y,Math.min(2*c*y,2*c*x+(y-x)*b)));
    }
    public static int lcm(int x, int y){
      return x*y/gcd(x,y);
    }
    public static int gcd(int x, int y){
      if(x < y)return gcd(y,x);
      if(y==0)return x;
      return gcd(y,x%y);
    }
}