#include <stdio.h>

int main(){
    int n = 1;
    int t = 0;

    while (n <= 100){
        if (n % 3 != 0 && n % 5 != 0){
            t = t + n;
        }
        n = n + 1;
    }

    printf("3の倍数でも5の倍数でもない数の合計は%d\n", t);
    return 0;
}
