#include <bits/stdc++.h>

using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); ++i)
double const PI = 3.1415926535897932384626433;
using P = pair<int, int>;

int main() {
    int n;
    cin >> n;
    cout << n / 3 << endl;
    return 0;
}
#include <stdio.h>


int main() {
    
    long long int N;
    long long int total = 0;
    
    scanf("%lld", &N);
    int i;
    for( i = 1; i <= N; i++){
        if(i % 3 != 0 && i % 5 != 0 ){
            total = total + i;
        }
    }
    
    printf("%lld\n", total);
    
    
    return 0;
}