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();
    int price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  }
} 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();
    int price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  }
} 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 price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  } 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 price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  } 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 price = Integer.MAX_VALUE; price Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    } int i = 0; int i = 0; i 0 i <= 100000 i 100000 i++ i++ i {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    } {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    } int tmp = 2 * C * i; tmp 2 * C * i 2 * C * i 2 C i if (X > i) {
        tmp += A * (X - i);
      } X > i X i {
        tmp += A * (X - i);
      } tmp += A * (X - i) tmp A * (X - i) A (X - i) X i if (Y > i) {
        tmp += B * (Y - i);
      } Y > i Y i {
        tmp += B * (Y - i);
      } tmp += B * (Y - i) tmp B * (Y - i) B (Y - i) Y i if (tmp < price) {
        price = tmp;
      } tmp < price tmp price {
        price = tmp;
      } price = tmp price tmp System.out.println(price) System.out.println System.out System System.out price 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 price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  }
} 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 price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  }
} 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();
    int price = Integer.MAX_VALUE;
    for (int i = 0; i <= 100000; i++) {
      int tmp = 2 * C * i;
      if (X > i) {
        tmp += A * (X - i);
      }
      if (Y > i) {
        tmp += B * (Y - i);
      }
      if (tmp < price) {
        price = tmp;
      }
    }
    System.out.println(price);
  }
}