I'm going to use a much smaller "year" as a demonstration here.

Think of it this way, say the year has 9 days in it. What is the middle day of the year?

Well, we have days

1 2 3 456 7 8 9

By inspection it looks like the middle day is 5. But . So how do we approach this?

Well, what you did amounts to solving , which gives a noninteger day. The reason for this is that 365 isn't even. But even then the middle day of an even list has no middle! For example

1 2 3 4 5 6 7 8

What is the middle number? There isn't one!

What this amounts to is that it is better to solve the equation . This will give you the correct day number. You can easily verify that this gives you the correct solution when the list has 9 elements.

-Dan