import std.stdio, std.algorithm;

void main() {
    int A, B, C, D, P;
    scanf("%d\n", &A);
    scanf("%d\n", &B);
    scanf("%d\n", &C);
    scanf("%d\n", &D);
    scanf("%d\n", &P);
    writeln( min(A * P, B + D * max(0, P - C)) );
}