using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int V, n;
            V = int.Parse(Console.ReadLine());
            n = 0;

            if (V == 10 || V == 5 || V == 2 || V == 1)
            {
                n = 1;
            }
            else
                if (V % 5 > 2)
                {
                    if (V % 5 == 3)
                        n = 2;
                    else
                        n = 3;
                }
                else
                {
                    n = 2;
                }
            if (V == 4)
            {
                n = 2;
            }

            if (V == 8)
            {
                n = 3;
            }
            Console.WriteLine(n);
            Console.ReadLine();
        }
    }
}