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