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 answer = 0;

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

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

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

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

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

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

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

    System.out.println(answer);
  } 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 answer = 0; answer 0 if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    } a / 2 + b / 2 < c a / 2 + b / 2 a / 2 a 2 b / 2 b 2 c {
      answer = a * x + b * y;
    } answer = a * x + b * y answer a * x + b * y a * x a x b * y b y {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    } if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      } x < y x y {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        } b < c * 2 b c * 2 c 2 {
          answer = c * x * 2 + b * (y - x);
        } answer = c * x * 2 + b * (y - x) answer c * x * 2 + b * (y - x) c * x * 2 c * x * 2 c x 2 b * (y - x) b (y - x) y x {
          answer = c * y * 2;
        } answer = c * y * 2 answer c * y * 2 c * y * 2 c y 2 {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      } if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        } a < c * 2 a c * 2 c 2 {
          answer = c * y * 2 + a * (x - y);
        } answer = c * y * 2 + a * (x - y) answer c * y * 2 + a * (x - y) c * y * 2 c * y * 2 c y 2 a * (x - y) a (x - y) x y {
          answer = c * x * 2;
        } answer = c * x * 2 answer c * x * 2 c * x * 2 c x 2 System.out.println(answer) System.out.println System.out System System.out answer 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 answer = 0;

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

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

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

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

    if (a / 2 + b / 2 < c) {
      answer = a * x + b * y;
    } else {
      if (x < y) {
        if (b < c * 2) {
          answer = c * x * 2 + b * (y - x);
        } else {
          answer = c * y * 2;
        }
      } else {
        if (a < c * 2) {
          answer = c * y * 2 + a * (x - y);
        } else {
          answer = c * x * 2;
        }
      }
    }

    System.out.println(answer);
  }
}
