print(sum(filter(lambda c: c % 3 == 0 or c % 5 == 0, range(1000))))