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();

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

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

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

    if (a + b < c * 2) {
      System.out.println(a * x + b * y);
    } else {
      if (x < y) {
        System.out.println(Math.min((c * 2) * x + (y - x) * b, c * 2 * y));
      } else {
        System.out.println(Math.min((c * 2) * y + (x - y) * a, c * 2 * x));
      }
    }
  }
}
