#include <bits/stdc++.h>
int a[4], d, sum, visit[4];
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int lcm(int x, int y) { return x / gcd(x, y) * y; }
void dfs(int deep, int temp, int i) {
  for (; i < 4; i++) {
    if (!visit[i]) {
      visit[i] = 1;
      if (deep & 1)
        sum -= d / lcm(temp, a[i]);
      else
        sum += d / lcm(temp, a[i]);
      dfs(deep + 1, lcm(temp, a[i]), i);
      visit[i] = 0;
    }
  }
}
int main() {
  int i, j;
  while (~scanf("%d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &d)) {
    sum = 0;
    memset(visit, 0, sizeof(visit));
    dfs(0, 1, 0);
    printf("%d\n", sum);
  }
  return 0;
}
