defmodule Main do def main do Date.range(~D[2015-01-01], ~D[2015-12-31]) |> Enum.map(fn date -> date.month == (date.day |> Integer.digits |> Enum.sum) end) |> Enum.filter(fn status -> status == true end) |> Enum.count |> IO.puts end end