Some years ago, I asked about a calendar whose leap year rule was that you add a day for every odd number the year number is divisible by and subtract a day for every even number the year number is divisible by. The average year length was an interesting and unexpected number. I've finally come up with another weird leap year rule that gives an interesting and unexpected average year length. The rule is to add a day for every way in which the year number is the sum of two squares. (Squares include 0 and 1.) For instance 2018 is the sum of two squares in just one way, 13^2 + 43^2, so it would have one leap day. 2019 is not the sum of two squares, so it would have no leap days. 2005 would have two leap days because 2005 = 18^2 + 41^2 = 22^2 + 39^2. 1850 would have been the latest year with exactly 3, and 1885 would have been the most recent year with exactly 4. So, what is the average year length under this rule? As before, I already know the answer.