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

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  }

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

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  }

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

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  } 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();

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  } 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 sc.close() sc.close sc long sum = 0; sum 0 if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    } (C * 2) <= (A + B) (C * 2) C 2 (A + B) A B {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      } X < Y X Y {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } sum += C * 2 * X sum C * 2 * X C * 2 * X C 2 X if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        } C * 2 < B C * 2 C 2 B {
          sum += C * (Y - X) * 2;
        } sum += C * (Y - X) * 2 sum C * (Y - X) * 2 C * (Y - X) * 2 C (Y - X) Y X 2 {
          sum += B * (Y - X);
        } sum += B * (Y - X) sum B * (Y - X) B (Y - X) Y X {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      } sum += C * 2 * Y sum C * 2 * Y C * 2 * Y C 2 Y if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        } C * 2 < A C * 2 C 2 A {
          sum += C * (X - Y) * 2;
        } sum += C * (X - Y) * 2 sum C * (X - Y) * 2 C * (X - Y) * 2 C (X - Y) X Y 2 {
          sum += A * (X - Y);
        } sum += A * (X - Y) sum A * (X - Y) A (X - Y) X Y {
      sum += X * A;
      sum += Y * B;
    } sum += X * A sum X * A X A sum += Y * B sum Y * B Y B System.out.println(sum) System.out.println System.out System System.out sum 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();

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  }

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

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  }

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

    sc.close(); 

    long sum = 0;

    if ((C * 2) <= (A + B)) {
      if (X < Y) {
        sum += C * 2 * X;
        if (C * 2 < B) {
          sum += C * (Y - X) * 2;
        } else {
          sum += B * (Y - X);
        }
      } else {
        sum += C * 2 * Y;
        if (C * 2 < A) {
          sum += C * (X - Y) * 2;
        } else {
          sum += A * (X - Y);
        }
      }
    } else {
      sum += X * A;
      sum += Y * B;
    }

    System.out.println(sum);
  
  }

}