﻿namespace CountWorkingDays
{
    using System;
    using System.Globalization;
    using System.Linq;

    class Count
    {
        static void Main()
        {
            DateTime startDate = DateTime.ParseExact(Console.ReadLine(), "dd-MM-yyyy", CultureInfo.InvariantCulture);
            DateTime endDate = DateTime.ParseExact(Console.ReadLine(), "dd-MM-yyyy", CultureInfo.InvariantCulture);

            DateTime[] officialHolidays = new DateTime[]
                {
                    new DateTime(startDate.Year, 01, 01),
                    new DateTime(startDate.Year, 03, 03),
                    new DateTime(startDate.Year, 05, 01),
                    new DateTime(startDate.Year, 05, 06),
                    new DateTime(startDate.Year, 05, 24),
                    new DateTime(startDate.Year, 09, 06),
                    new DateTime(startDate.Year, 09, 22),
                    new DateTime(startDate.Year, 11, 01),
                    new DateTime(startDate.Year, 12, 24),
                    new DateTime(startDate.Year, 12, 25),
                    new DateTime(startDate.Year, 12, 26)
                };

            int count = 0;

            for (DateTime cur = startDate; cur <= endDate; cur = cur.AddDays(1))
            {
                if(IsOff(cur, officialHolidays))
                {
                    count++;
                }
            }

            Console.WriteLine(count);
        }

        private static bool IsOff(DateTime cur, DateTime[] officialHolidays)
        {
            if(officialHolidays.Where(x => x.Month.Equals(cur.Month)).Select(x => x.Day).Contains(cur.Day))
            {
                return false;
            }

            if(cur.DayOfWeek.Equals(DayOfWeek.Sunday) || cur.DayOfWeek.Equals(DayOfWeek.Saturday))
            {
                return false;
            }
            return true;
        }
    }
}
