aboutsummaryrefslogtreecommitdiff
path: root/InsomiaCure/main.cpp
blob: 7feef4a23c1266f30691f1777b5fa09344b6a9d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int k, l, m, n, d;
  cin >> k >> l >> m >> n >> d;
  int ans = 0;
  for (int i = 1; i <= d; i++) {
    if (i % m == 0 || i % k == 0 || i % n == 0 || i % l == 0) {
      ans++;
    }
  }
  cout << ans << endl;
}