The Republican calendar only had 355days, which meant that it would quickly unsynchronize from the solar year, causing, for example, agricultural festivals to occur out of season. The Roman solution to this problem was to periodically lengthen the calendar by adding extra days "within" February. February was broken into two parts, each with an odd number of days. The first part ended with the Terminalia on the 23rd ('), which was considered the end of the religious year; the five remaining days beginning with the Regifugium on the 24th (') formed the second part; and the intercalary month Mercedonius was inserted between them. In such years, the days between the ides and the Regifugium were counted down to either the Intercalary Kalends or to the Terminalia. The intercalary month counted down to nones and ides on its 5th and 13th day in the manner of the other short months. The remaining days of the month counted down towards the March Kalends, so that the end of Mercedonius and the second part of February were indistinguishable to the Romans, one ending on ' and the other picking up at ' and bearing the normal festivals of such dates.