import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    }

    static int min(int... a) {
        Arrays.sort(a);
        return a[0];
    }

    static int f(int a) {
        return a < 0 ? 0 : a;
    }
}

class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        }
        return cbuf[head++];
    }

    void back() {
        head--;
    }

    boolean minus() {
        boolean minus;
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    }

    void skip() {
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        }
    }

    char[] s(final int N) {
        skip();
        char[] s = new char[N];
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
        }
        return s;
    }

    int i() {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    long l() {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }
} import java.io.*; io.* java import java.util.*; util.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    }

    static int min(int... a) {
        Arrays.sort(a);
        return a[0];
    }

    static int f(int a) {
        return a < 0 ? 0 : a;
    }
} Main static MyReader in = new MyReader(); in new MyReader() public static void main(String[] args){
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    } main {
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    } int a = in.i(); a in.i() in.i in int b = in.i(); b in.i() in.i in int c = in.i(); c in.i() in.i in int x = in.i(); x in.i() in.i in int y = in.i(); y in.i() in.i in int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y); ans min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y) min a * x + b * y a * x a x b * y b y b * f(y - x) + c * 2 * x b * f(y - x) b f(y - x) f y - x y x c * 2 * x c * 2 * x c 2 x a * f(x - y) + c * 2 * y a * f(x - y) a f(x - y) f x - y x y c * 2 * y c * 2 * y c 2 y out.println(ans) out.println out ans String[] args args static int min(int... a) {
        Arrays.sort(a);
        return a[0];
    } min {
        Arrays.sort(a);
        return a[0];
    } Arrays.sort(a) Arrays.sort Arrays a return a[0]; a[0] a 0 int... a a static int f(int a) {
        return a < 0 ? 0 : a;
    } f {
        return a < 0 ? 0 : a;
    } return a < 0 ? 0 : a; a < 0 ? 0 : a a < 0 a 0 0 a int a a class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        }
        return cbuf[head++];
    }

    void back() {
        head--;
    }

    boolean minus() {
        boolean minus;
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    }

    void skip() {
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        }
    }

    char[] s(final int N) {
        skip();
        char[] s = new char[N];
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
        }
        return s;
    }

    int i() {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    long l() {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }
} MyReader char[] cbuf = new char[1024]; cbuf new char[1024] 1024 int head = 0; head 0 int tail = 0; tail 0 MyReader() {
        super(new InputStreamReader(System.in));
    } MyReader {
        super(new InputStreamReader(System.in));
    } super(new InputStreamReader(System.in)) super new InputStreamReader(System.in) char next() {
        if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        }
        return cbuf[head++];
    } next {
        if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        }
        return cbuf[head++];
    } if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        } head == tail head tail {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        } try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {} catch (IOException e) {} IOException e {} {
                tail = read(cbuf, 0, cbuf.length);
            } tail = read(cbuf, 0, cbuf.length) tail read(cbuf, 0, cbuf.length) read cbuf 0 cbuf.length cbuf cbuf.length head = 0 head 0 return cbuf[head++]; cbuf[head++] cbuf head++ head void back() {
        head--;
    } back {
        head--;
    } head-- head boolean minus() {
        boolean minus;
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    } minus {
        boolean minus;
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    } boolean minus; minus while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        } true {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        } char c = next(); c next() next if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            } c != ' ' && c != '\n' && c != '\r' c != ' ' && c != '\n' && c != '\r' c != ' ' c ' ' c != '\n' c '\n' c != '\r' c '\r' {
                if (!(minus = c == '-')) back();
                return minus;
            } if (!(minus = c == '-')) back(); !(minus = c == '-') (minus = c == '-') minus c == '-' c '-' back() back return minus; minus void skip() {
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        }
    } skip {
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        }
    } while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        } true {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        } char c = next(); c next() next if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            } c != ' ' && c != '\n' && c != '\r' c != ' ' && c != '\n' && c != '\r' c != ' ' c ' ' c != '\n' c '\n' c != '\r' c '\r' {
                back();
                break;
            } back() back break; char[] s(final int N) {
        skip();
        char[] s = new char[N];
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
        }
        return s;
    } s {
        skip();
        char[] s = new char[N];
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
        }
        return s;
    } skip() skip char[] s = new char[N]; s new char[N] N for (int i = 0; i < s.length; i++) {
            s[i] = next();
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            s[i] = next();
        } {
            s[i] = next();
        } s[i] = next() s[i] s i next() next return s; s final int N N int i() {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    } i {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    } boolean minus = minus(); minus minus() minus int n = 0; n 0 while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        } true {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        } int k = next() - '0'; k next() - '0' next() next '0' if (k < 0 || 9 < k) break; k < 0 || 9 < k k < 0 k 0 9 < k 9 k break; n = 10 * n + k n 10 * n + k 10 * n 10 n k return minus ? -n : n; minus ? -n : n minus -n n n int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    } ii {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    } int[] a = new int[N]; a new int[N] N for (int j = 0; j < a.length; j++) a[j] = i(); int j = 0; int j = 0; j 0 j < a.length j a.length a a.length j++ j++ j a[j] = i(); a[j] = i() a[j] a j i() i return a; a final int N N long l() {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    } l {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    } boolean minus = minus(); minus minus() minus long n = 0; n 0 while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        } true {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        } int k = next() - '0'; k next() - '0' next() next '0' if (k < 0 || 9 < k) break; k < 0 || 9 < k k < 0 k 0 9 < k 9 k break; n = 10 * n + k n 10 * n + k 10 * n 10 n k return minus ? -n : n; minus ? -n : n minus -n n n BufferedReader public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    }

    static int min(int... a) {
        Arrays.sort(a);
        return a[0];
    }

    static int f(int a) {
        return a < 0 ? 0 : a;
    }
} public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    }

    static int min(int... a) {
        Arrays.sort(a);
        return a[0];
    }

    static int f(int a) {
        return a < 0 ? 0 : a;
    }
} Main
import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int a = in.i();
        int b = in.i();
        int c = in.i();
        int x = in.i();
        int y = in.i();
        int ans = min(
              a * x + b * y,
              b * f(y - x) + c * 2 * x,
              a * f(x - y) + c * 2 * y);
        out.println(ans);
    }

    static int min(int... a) {
        Arrays.sort(a);
        return a[0];
    }

    static int f(int a) {
        return a < 0 ? 0 : a;
    }
}

class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = read(cbuf, 0, cbuf.length);
            } catch (IOException e) {}
            head = 0;
        }
        return cbuf[head++];
    }

    void back() {
        head--;
    }

    boolean minus() {
        boolean minus;
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    }

    void skip() {
        while (true) {
            char c = next();
            if (c != ' ' && c != '\n' && c != '\r') {
                back();
                break;
            }
        }
    }

    char[] s(final int N) {
        skip();
        char[] s = new char[N];
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
        }
        return s;
    }

    int i() {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    long l() {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }
}
