import java.util.Scanner;

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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  }
}     import java.util.Scanner; Scanner 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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  }
} 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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  } 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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  } 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 int min =1000000000; min 1000000000 for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    } int i =0; int i =0; i 0 i<=Math.max(X,Y) * 2 i Math.max(X,Y) * 2 Math.max(X,Y) Math.max Math X Y 2 i+=2 i+=2 i 2 {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    } {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    } int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B; ans i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B i * C i C 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 A 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 B min = Math.min(ans,min) min Math.min(ans,min) Math.min Math ans min System.out.println(min) System.out.println System.out System System.out min 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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  }
} 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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  }
} Main
import java.util.Scanner;

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();
    int min =1000000000;
    for (int i =0; i<=Math.max(X,Y) * 2; i+=2) {
      int ans = i * C + Math.max(0,(X - i/2)) * A + Math.max(0,Y - i/2) * B;
      min = Math.min(ans,min);
    }
    System.out.println(min);
  }
}    