#include <iostream>
#include <cmath>
using namespace std;

int main() {
  unsigned long long p, q, r, l, n;

  cin >> p >> q >> r >> l >> n;

  unsigned long long brojac = 0;

  for (int i = l ; i < n + 1 ; i++)
  {
    if(ceil(float(i) / p) +  ceil(float(i) / q) +  ceil(float(i) / r) == i) brojac++;
  }
    
  cout << brojac;
}