import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    } main {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in int c = in.nextInt(); c in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int y = in.nextInt(); y in.nextInt() in.nextInt in int mx = Math.max(x, y); mx Math.max(x, y) Math.max Math x y int mn = Math.min(x, y); mn Math.min(x, y) Math.min Math x y int ans = 0; ans 0 if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        } 2 * c < a + b 2 * c 2 c a + b a b {
            ans += 2 * c * mn;
        } ans += 2 * c * mn ans 2 * c * mn 2 * c * mn 2 c mn {
            System.out.println(a * x + b * y);
            return;
        } 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 return; if (x > y) {
            if (a < 2 * c) {
                ans += (x - y) * a;
            } else {
                ans += (x - y) * 2 * c;
            }
        } else {
            if (b < 2 * c) {
                ans += (y - x) * b;
            } else {
                ans += (y - x) * 2 * c;
            }
        } x > y x y {
            if (a < 2 * c) {
                ans += (x - y) * a;
            } else {
                ans += (x - y) * 2 * c;
            }
        } if (a < 2 * c) {
                ans += (x - y) * a;
            } else {
                ans += (x - y) * 2 * c;
            } a < 2 * c a 2 * c 2 c {
                ans += (x - y) * a;
            } ans += (x - y) * a ans (x - y) * a (x - y) x y a {
                ans += (x - y) * 2 * c;
            } ans += (x - y) * 2 * c ans (x - y) * 2 * c (x - y) * 2 * c (x - y) x y 2 c {
            if (b < 2 * c) {
                ans += (y - x) * b;
            } else {
                ans += (y - x) * 2 * c;
            }
        } if (b < 2 * c) {
                ans += (y - x) * b;
            } else {
                ans += (y - x) * 2 * c;
            } b < 2 * c b 2 * c 2 c {
                ans += (y - x) * b;
            } ans += (y - x) * b ans (y - x) * b (y - x) y x b {
                ans += (y - x) * 2 * c;
            } ans += (y - x) * 2 * c ans (y - x) * 2 * c (y - x) * 2 * c (y - x) y x 2 c 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 in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int mx = Math.max(x, y);
        int mn = Math.min(x, y);

        int ans = 0;
        if (2 * c < a + b) {
            ans += 2 * c * mn;
        } else {
            System.out.println(a * x + b * y);
            return;
        }

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

        System.out.println(ans);
    }
}