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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  }
} 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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  }
} 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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  } 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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  } 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 long ans = x * a + y * b; ans x * a + y * b x * a x a y * b y b for(int i = 1; i <= Math.max(x, y); i++){
      long buf = i * 2 * c + Math.max(0, x - i) * a + Math.max(0, y - i) * b;
      if(buf < ans){
        ans = buf;
      }
    } int i = 1; int i = 1; i 1 i <= Math.max(x, y) i Math.max(x, y) Math.max Math x y i++ i++ i {
      long buf = i * 2 * c + Math.max(0, x - i) * a + Math.max(0, y - i) * b;
      if(buf < ans){
        ans = buf;
      }
    } {
      long buf = i * 2 * c + Math.max(0, x - i) * a + Math.max(0, y - i) * b;
      if(buf < ans){
        ans = buf;
      }
    } long buf = i * 2 * c + Math.max(0, x - i) * a + Math.max(0, y - i) * b; buf i * 2 * c + Math.max(0, x - i) * a + Math.max(0, y - i) * b i * 2 * c + Math.max(0, x - i) * a + Math.max(0, y - i) * b i * 2 * c i * 2 * c i 2 c Math.max(0, x - i) * a Math.max(0, x - i) Math.max Math 0 x - i x i a Math.max(0, y - i) * b Math.max(0, y - i) Math.max Math 0 y - i y i b if(buf < ans){
        ans = buf;
      } buf < ans buf ans {
        ans = buf;
      } ans = buf ans buf System.out.println(ans) System.out.println System.out System System.out ans String[] args args 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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  }
} 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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  }
} 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();
    long ans = x * a + y * b;

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

    System.out.println(ans);
  }
}
