import java.util.Scanner;

public class Main {
  public static void main (String[] args) {
      Scanner sc = new Scanner(System.in);

      long a = sc.nextInt();
      long b = sc.nextInt();
      long c = sc.nextInt();
      long x = sc.nextInt();
      long y = sc.nextInt();

      long ans_1 = 0L;
      long ans_2 = 0L;
      long tmp_1 = 0L;
      long tmp_2 = 0L;

      ans_1 = a*x + b*y;

      if(a < b) {
        ans_2 += c*y*2;
        if(x >= y) {
          ans_2 += (x-y)*a;
        }
      } else if (b > a) {
        ans_2 += c*x*2;
        if(y >= x) {
          ans_2 += (y-x)*b;
        }
      } else {
        tmp_1 += c*y*2;
        if(x > y) {
          tmp_1 += (x-y)*a;
        }
        tmp_2 += c*x*2;
        if(y > x) {
          tmp_2 += (y-x)*b;
        }
        ans_2 = Math.min(tmp_2,tmp_1);
      }

      System.out.println(Math.min(ans_1,ans_2));
  }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz