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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  }
} 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  }
} 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  } 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  } 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    } a + b < c * 2 a + b a b c * 2 c 2 {
      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 {
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    } int sum = Math.min(x, y) * 2 * c; sum Math.min(x, y) * 2 * c Math.min(x, y) * 2 * c Math.min(x, y) Math.min Math x y 2 c if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      } Math.max(x, y) == x Math.max(x, y) Math.max Math x y x {
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      } if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        } a > c * 2 a c * 2 c 2 {
          sum += (x - y) * c * 2;
        } sum += (x - y) * c * 2 sum (x - y) * c * 2 (x - y) * c * 2 (x - y) x y c 2 {
          sum += (x - y) * a;
        } sum += (x - y) * a sum (x - y) * a (x - y) x y a {
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      } if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        } b > c * 2 b c * 2 c 2 {
          sum += (y - x) * c * 2;
        } sum += (y - x) * c * 2 sum (y - x) * c * 2 (y - x) * c * 2 (y - x) y x c 2 {
          sum += (y - x) * b;
        } sum += (y - x) * b sum (y - x) * b (y - x) y x b System.out.println(sum) System.out.println System.out System System.out sum 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  }
} 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  }
} 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 < c * 2){
      System.out.println(a * x + b * y);
    }else{
      int sum = Math.min(x, y) * 2 * c;
      if(Math.max(x, y) == x){
        if(a > c * 2){
          sum += (x - y) * c * 2;
        }else{
          sum += (x - y) * a;
        }
      }else{
        if(b > c * 2){
          sum += (y - x) * c * 2;
        }else{
          sum += (y - x) * b;
        }
      }
      System.out.println(sum);
    }
  }
}