#include <stdio.h>

int main() {
	int n = 1;
    int total = 0;
    
   while ( n <= 100)   {
           if(n % 3 != 0 && n % 5 != 0) {
              total = total + n;
           }
            n = n + 1;
}
  printf("%d",total);
	return 0;
}
