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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   }
} 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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   }
} 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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   } 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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   } 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 cost = 0; cost 0 if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      } x <= y x y {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } a + b <= 2 * c a + b a b 2 * c 2 c {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } cost += (a + b) * x cost (a + b) * x (a + b) a b x if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            } b <= 2 * c b 2 * c 2 c {
               cost += b * (y - x);
            } cost += b * (y - x) cost b * (y - x) b (y - x) y x {
               cost += 2 * c * (y - x);
            } cost += 2 * c * (y - x) cost 2 * c * (y - x) 2 * c * (y - x) 2 c (y - x) y x {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } cost += 2 * c * x cost 2 * c * x 2 * c * x 2 c x if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            } b <= 2 * c b 2 * c 2 c {
               cost += b * (y - x);
            } cost += b * (y - x) cost b * (y - x) b (y - x) y x {
               cost += 2 * c * (y - x);
            } cost += 2 * c * (y - x) cost 2 * c * (y - x) 2 * c * (y - x) 2 c (y - x) y x {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      } if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } a + b <= 2 * c a + b a b 2 * c 2 c {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } cost += (a + b) * y cost (a + b) * y (a + b) a b y if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            } a <= 2 * c a 2 * c 2 c {
               cost += a * (x - y);
            } cost += a * (x - y) cost a * (x - y) a (x - y) x y {
               cost += 2 * c * (x - y);
            } cost += 2 * c * (x - y) cost 2 * c * (x - y) 2 * c * (x - y) 2 c (x - y) x y {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } cost += 2 * c * y cost 2 * c * y 2 * c * y 2 c y if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            } a <= 2 * c a 2 * c 2 c {
               cost += a * (x - y);
            } cost += a * (x - y) cost a * (x - y) a (x - y) x y {
               cost += 2 * c * (x - y);
            } cost += 2 * c * (x - y) cost 2 * c * (x - y) 2 * c * (x - y) 2 c (x - y) x y System.out.println(cost) System.out.println System.out System System.out cost 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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   }
} 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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   }
} 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 cost = 0;

      if (x <= y) {
         if (a + b <= 2 * c) {
            cost += (a + b) * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         } else {
            cost += 2 * c * x;
            if (b <= 2 * c) {
               cost += b * (y - x);
            } else {
               cost += 2 * c * (y - x);
            }
         }
      } else {
         if (a + b <= 2 * c) {
            cost += (a + b) * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         } else {
            cost += 2 * c * y;
            if (a <= 2 * c) {
               cost += a * (x - y);
            } else {
               cost += 2 * c * (x - y);
            }
         }
      }
      
      System.out.println(cost);

   }
}