import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int y = Integer.parseInt(sc.next()); y Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long ans = 0; ans 0 int min = Math.min(x, y); min Math.min(x, y) Math.min Math x y if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        } a + b > c * 2 a + b a b c * 2 c 2 {
            ans += c * 2 * min;
        } ans += c * 2 * min ans c * 2 * min c * 2 * min c 2 min {
            ans += min * a + min * b;
        } ans += min * a + min * b ans min * a + min * b min * a min a min * b min b int sub = Math.abs(x - y); sub Math.abs(x - y) Math.abs Math x - y x y if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        } sub != 0 sub 0 {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        } if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            } x > y x y {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                } a > c * 2 a c * 2 c 2 {
                    ans += c * 2 * sub;
                } ans += c * 2 * sub ans c * 2 * sub c * 2 * sub c 2 sub {
                    ans += a * sub;
                } ans += a * sub ans a * sub a sub {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            } if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                } b > c * 2 b c * 2 c 2 {
                    ans += c * 2 * sub;
                } ans += c * 2 * sub ans c * 2 * sub c * 2 * sub c 2 sub {
                    ans += b * sub;
                } ans += b * sub ans b * sub b sub System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());
        long ans = 0;
        int min = Math.min(x, y);
        if (a + b > c * 2) {
            ans += c * 2 * min;
        } else {
            ans += min * a + min * b;
        }
        int sub = Math.abs(x - y);
        if (sub != 0) {
            if (x > y) {
                if (a > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += a * sub;
                }
            } else {
                if (b > c * 2) {
                    ans += c * 2 * sub;
                } else {
                    ans += b * sub;
                }
            }
        }
        System.out.println(ans);
    }
}