#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  int end,sum,te;
  sum = 0;
 
  for(a = 1;a <= end; a++){
    b = a - (a/3)*3;
    c = a - (a/5)*5;
    if(b&&c){
      te = sum;
      sum = te + a;
    }
  }
  cout << sum << endl;
}