#include using namespace std; typedef long long LL; int main() { LL N;cin>>N; cout<<(N/3+N/5)*2<