#include <stdio.h>

int main(void) {
	int a=0,b=0;

while(a<=99){
a=a+1;
b=b+a;
if((a%3==0)||(a%5==0)){

b=b-a;} }

printf("%d", b);
	
return 0;
}
