#include <bits/stdc++.h>
using std::cin;
using std::cout;
const int INPUT_LENGTH = 4;
int input[INPUT_LENGTH] = {0, 0, 0, 0};
int main() {
  cin >> input[0];
  int dragons = 0, sum = 0;
  if (input[0] != 1) {
    for (int i = 1; i < INPUT_LENGTH; i++) {
      cin >> input[i];
      for (int j = 0; j < i; j++) {
        if (input[j] != 0) {
          if (input[i] % input[j] == 0) {
            input[i] = 0;
          }
        }
      }
    }
    cin >> dragons;
  } else {
    for (int i = 1; i < INPUT_LENGTH; i++) {
      cin >> input[i];
    }
    cin >> dragons;
    cout << dragons;
    return 0;
  }
  bool dragons_damaged[dragons];
  for (int i = 0; i < dragons; i++) {
    dragons_damaged[i] = false;
  }
  for (int i = 0; i < INPUT_LENGTH; i++) {
    if (input[i] != 0) {
      for (int j = input[i] - 1; j < dragons; j += input[i]) {
        if ((j + 1) % input[i] == 0) {
          if (dragons_damaged[j] != true) {
            dragons_damaged[j] = true;
            sum++;
          }
        }
      }
    }
  }
  cout << sum;
  return 0;
}
