One Earth's orbit takes 365 days 5 hours 49 mins 16 seconds
For every year, 1/4 day - 644 secs is shortened.
For every 4 years, 1 day is added to cancel the shortage of 1 day (1/4 day per year). This still leaves the excess of 2576 secs (644 secs per year).
For every 100 years, 86400 secs (1 day) is removed (leap year is canceled) from the accumulated excess of 64400 secs. This leaves shortage of 22000 secs after 100 years.
For every 400 years, 86400 secs (1 day) is added to cancel the shortage of 88000 secs, which leaves shortage of 1600 secs.