#include <cstdio>
#include <cassert>
#include <cstring>
#include <algorithm>

using namespace std;

const int maxn = 310;

int x, a, y, b, l;
int f[maxn][maxn];

inline void relax( int &a, int b ) { if (a < b) a = b; }

bool solve( int w )
{
  memset(f, -1, sizeof(f));
  f[x][y] = 0;
  for (int i = x; i >= 0; i--)
    for (int j = y; j >= 0; j--)
      if (f[i][j] != -1)
      {
        if (f[i][j] >= l)
          return true;
        int val = f[i][j] + 1;
        int ti = 0, tj = (w + b - 1) / b;
        int si = 0, sj = b * tj;
        while (ti <= i && si < w + a)
        {
          if (tj <= j)
            relax(f[i - ti][j - tj], val);
          ti++, si += a;
          while (tj > 0 && si + sj >= w + b)
            tj--, sj -= b;
        }
      }
  return false;
}

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

  assert(scanf("%d%d%d%d%d", &x, &a, &y, &b, &l) == 5);
  assert(1 <= x && x <= 150);
  assert(1 <= a && a <= 150);
  assert(1 <= y && y <= 150);
  assert(1 <= b && b <= 150);
  assert(1 <= l && l <= 150);
  assert(x + y >= l);
  if (a < b)
    swap(a, b), swap(x, y);
  int mi = 1, ma = (x * a + y * b) / l;
  while (mi < ma)
  {
    int av = (mi + ma + 1) / 2;
    if (solve(av))
      mi = av;
    else
      ma = av - 1;
  }
  printf("%d\n", mi);

  return 0;
}
