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 ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  }
} 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 ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  }
} 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 ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  } 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 ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  } 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 ans = 0; ans 0 while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    } X > 0 || Y >0 X > 0 X 0 Y >0 Y 0 {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    } if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      } X >= 1 && Y >= 1 X >= 1 X 1 Y >= 1 Y 1 {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } int num = Math.min(X, Y); num Math.min(X, Y) Math.min Math X Y if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        } 2*C < A + B 2*C 2 C A + B A B {
          ans += 2*C*num;
        } ans += 2*C*num ans 2*C*num 2*C*num 2 C num {
          ans += (A+B)*num;
        } ans += (A+B)*num ans (A+B)*num (A+B) A B num X -= num X num Y -= num Y num if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      } X >= 1 X 1 {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        } 2*C < A 2*C 2 C A {
          ans += 2*C*X;
        } ans += 2*C*X ans 2*C*X 2*C*X 2 C X {
          ans += A*X;
        } ans += A*X ans A*X A X X -= X X X if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      } Y >= 1 Y 1 {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      } if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        } 2*C < B 2*C 2 C B {
          ans += 2*C*Y;
        } ans += 2*C*Y ans 2*C*Y 2*C*Y 2 C Y {
          ans += B*Y;
        } ans += B*Y ans B*Y B Y Y -= Y Y Y 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 = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int Y = sc.nextInt();

    int ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  }
} 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 ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  }
} 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 ans = 0;
    while (X > 0 || Y >0) {
      if (X >= 1 && Y >= 1) {
        
        int num = Math.min(X, Y);
        if (2*C < A + B) {
          ans += 2*C*num;
        } else {
          ans += (A+B)*num;
        }
        X -= num;
        Y -= num;
      } else if (X >= 1) {
        if (2*C < A) {
          ans += 2*C*X;
        } else {
          ans += A*X;
        }
        X -= X;
      } else if (Y >= 1) {
        if (2*C < B) {
          ans += 2*C*Y;
        } else {
          ans += B*Y;
        }
        Y -= Y;
      }
    }

    System.out.println(ans);
  }
}