#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
  freopen("bridge.in", "r", stdin);
  freopen("bridge.out", "w", stdout);

  int a, b, l, x, y;
  scanf("%d%d%d%d%d", &x, &a, &y, &b, &l);
  int minw = min(a, b), maxw = x * a + y * b;
  int **d = new int*[x + 1];
  for (int i = 0; i <= x; i++)
    d[i] = new int[y + 1];
  while (minw < maxw)
  {
    int ave = (minw + maxw + 1) / 2;
    for (int i = 0; i <= x; i++)
      for (int j = 0; j <= y; j++)
        d[i][j] = 1;
    d[0][0] = 0;
    for (int i = 0; i <= x; i++)
      for (int j = 0; j <= y; j++)
        for (int k = 0; k <= i; k++)
        {
          int t = max((ave - k * a + b - 1) / b, 0);
          if (t > j)
            continue;
          d[i][j] = max(d[i][j], d[i - k][j - t] + 1);
        }
    int len = 0;
    for (int i = 0; i <= x; i++)
      for (int j = 0; j <= y; j++)
        len = max(d[i][j], len);
    if (len >= l)
      minw = ave;
    else
      maxw = ave - 1;
  }
  printf("%d\n", minw);

  return 0;
}

