module Main where
divisible_by_3_or_5 x = (x `mod` 3 == 0) || (x `mod` 5 == 0)
main = do
print (sum (filter divisible_by_3_or_5 [1..999]))