#include <iostream>
using namespace std;
typedef long long LL;

LL div_count(LL x, LL y, short z) {
  return (y / z) - (x / z) + (x % z == 0);
}

LL div_ceil(LL x, short y) {
  return (x / y) + (x % y != 0);
}

int main() {
  short p, q, r;
  LL l, d, t, k = 0;
  cin >> p >> q >> r >> l >> d;

  if (p * q + q * r + r * p == p * q * r) {
    switch(p * q * r) {
      case 27: // 3, 3, 3
        k = div_count(l, d, 3);
        break;
      case 32: // 2, 4, 4
        k = div_count(l, d, 4);
        break;
      case 36: // 2, 3, 6
        k = div_count(l, d, 6);
        break;
    }
  }
  if (p * q + q * r + r * p < p * q * r) {
    if (d < 2 * p * q * r) t = d;
    else t = 2 * p * q * r;
    for (LL i = l; i <= t; i++) {
      if (div_ceil(i, p) + div_ceil(i, q) + div_ceil(i, r) > i) {
        k++;
      }
    }
    k = d - l + 1 - k;
  }
  cout << k << endl;
  return 0;
}