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