#include using namespace std; typedef unsigned long long ullong; int main(int argc, char** argv) { ullong N; cin >> N; ullong ans = 0; ans += (N/15) * 16; ans += (N%15/3) * 2; ans += (N%15/5) * 2; cout << ans << endl; return 0; }