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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  }
} 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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  }
} 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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  } 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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  } 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 i = a * x + b * y; i a * x + b * y a * x a x b * y b y int ii = c * 2 * Math.max(x, y); ii c * 2 * Math.max(x, y) c * 2 * Math.max(x, y) c 2 Math.max(x, y) Math.max Math x y int iii = 0; iii 0 if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    } x > y x y {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } iii = c * 2 * Math.min(x, y) + a * (x - y) iii c * 2 * Math.min(x, y) + a * (x - y) c * 2 * Math.min(x, y) c * 2 * Math.min(x, y) c 2 Math.min(x, y) Math.min Math x y a * (x - y) a (x - y) x y {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    } iii = c * 2 * Math.min(x, y) + b * (y - x) iii c * 2 * Math.min(x, y) + b * (y - x) c * 2 * Math.min(x, y) c * 2 * Math.min(x, y) c 2 Math.min(x, y) Math.min Math x y b * (y - x) b (y - x) y x System.out.println(Math.min(Math.min(i, ii), iii)) System.out.println System.out System System.out Math.min(Math.min(i, ii), iii) Math.min Math Math.min(i, ii) Math.min Math i ii iii 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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  }
} 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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  }
} 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 i = a * x + b * y;
    int ii = c * 2 * Math.max(x, y);
    int iii = 0;
    if (x > y) {
      iii = c * 2 * Math.min(x, y) + a * (x - y);
    } else {
      iii = c * 2 * Math.min(x, y) + b * (y - x);
    }
    System.out.println(Math.min(Math.min(i, ii), iii));
  }
}
