int main(){
    int A, B, C, X, Y;
    
    scanf("%d %d %d %d %d\n", &A, &B, &C, &X, &Y);
    
    int max = X;
    int min = Y;
    int max_cost = X;
    
    if (X < Y){
        min = X;
        max = Y;
        max_cost = Y; 
    }
    
    int pattern[3];
    
    pattern[0] = A * X + B * Y;
    pattern[1] = min * 2 * C + (max - min) * max_cost;
    pattern[2] = max * 2 * C;
    
    int result = pattern[0];
    int i;
    
    for (i = 0; i < 3; i++){
        if (result > pattern[i]){
            result = pattern[i];
        }
        printf("%d\n", pattern[i]);
    }
    
    printf("%d", result);
    
    return 0;
}