//

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Linq;

namespace sar_cs
{
    public class Program
    {
        public class Parser
        {
            const int BufSize = 25000;
            TextReader s;
            char[] buf = new char[BufSize];
            int bufPos;
            int bufDataSize;
            bool eos;   // eos read to buffer
            int lastChar = -2;
            int nextChar = -2;
            StringBuilder sb = new StringBuilder();

            void FillBuf()
            {
                if (eos) return;
                bufDataSize = s.Read(buf, 0, BufSize);
                if (bufDataSize == 0) eos = true;
                bufPos = 0;
            }

            int Read()
            {
                if (nextChar != -2)
                {
                    lastChar = nextChar;
                    nextChar = -2;
                }
                else
                {
                    if (bufPos == bufDataSize) FillBuf();
                    if (eos) lastChar = -1;
                    else lastChar = buf[bufPos++];
                }
                return lastChar;
            }

            void Back()
            {
                if (lastChar == -2) throw new Exception();  // no chars were ever read
                nextChar = lastChar;
            }

            public Parser()
            {
                s = Console.In;
            }

            public int ReadInt()
            {
                int res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-')
                {
                    sign = -sign;
                    c = Read();
                }
                int len = 0;
                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    if ((uint)(c -= 48) >= 10) throw new InvalidDataException();
                    len++;
                    res = checked(res * 10 - c);
                    c = Read();
                }
                if (len == 0) throw new InvalidDataException();
                Back();
                return checked(res * sign);
            }

            public long ReadLong()
            {
                long res = 0;
                int sign = -1;
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));
                if (c == '-')
                {
                    sign = -sign;
                    c = Read();
                }
                int len = 0;
                checked
                {
                    while (c >= 0 && !char.IsWhiteSpace((char)c))
                    {
                        if ((uint)(c -= 48) >= 10) throw new InvalidDataException();
                        len++;
                        res = res * 10 - c;
                        c = Read();
                    }
                    if (len == 0) throw new InvalidDataException();
                    Back();
                    return res * sign;
                }
            }

            public double ReadDouble()
            {
                int c;
                do { c = Read(); } while (c >= 0 && char.IsWhiteSpace((char)c));

                int sign = 1;
                if (c == '-')
                {
                    sign = -1;
                    c = Read();
                }

                sb.Length = 0;
                while (c >= 0 && !char.IsWhiteSpace((char)c))
                {
                    sb.Append((char)c);
                    c = Read();
                }

                Back();
                double res = double.Parse(sb.ToString(), CultureInfo.InvariantCulture);
                return res * sign;
            }

            public string ReadLine()
            {
                int c = Read();
                sb.Length = 0;
                while (c != -1 && c != 13 && c != 10)
                {
                    sb.Append((char)c);
                    c = Read();
                }
                if (c == 13)
                {
                    c = Read();
                    if (c != 10) Back();
                }
                return sb.ToString();
            }

            public bool EOF
            {
                get
                {
                    if (Read() == -1) return true;
                    Back();
                    return false;
                }
            }

            public bool SeekEOF
            {
                get
                {
                L0:
                    int c = Read();
                    if (c == -1) return true;
                    if (char.IsWhiteSpace((char)c)) goto L0;
                    Back();
                    return false;
                }
            }
        }

        static void pe()
        {
            Console.WriteLine("???");
            Environment.Exit(0);
        }

        static void re()
        {
            Environment.Exit(55);
        }

        static int nosol()
        {
            Console.WriteLine("ERROR");
            return 0;
        }

        static Stopwatch sw = Stopwatch.StartNew();

        static StringBuilder sb = new StringBuilder();
        static Random rand = new Random(52345235);

        static void Swap<T>(ref T a, ref T b)
        {
            T t = a;
            a = b;
            b = t;
        }

        static int n;
        static int[] j = new int[6];
        static int[,] l = new int[6, 6];
        static int[,] h = new int[6, 6];
        static int[,] a = new int[6, 6];
        static int[,] flow = new int[6, 6];

        static int resultFlow;
        static int resultCost;

        static void per(int v, int w, int q)
        {
            if (q < 0) throw new Exception();

            int j_bak = j[w];

            if (w == n - 1)
            {
                if (q >= l[v, w] && q <= h[v, w])
                {
                    flow[v, w] = q;
                    j[w] = j_bak + q;
                    visit(v + 1);
                }
            }
            else
            {
                for (int i = l[v, w]; i <= h[v, w]; i++)
                {
                    if (i > q) break;
                    if (q - i > 5 * (n - 1 - w)) continue;
                    flow[v, w] = i;
                    j[w] = j_bak + i;
                    per(v, w + 1, q - i);
                }
            }

            flow[v, w] = 0;
            j[w] = j_bak;
        }

        static void visit(int v)
        {
            if (v == n - 1)
            {
                if (j[n - 1] != j[0]) throw new Exception();
                if (j[n - 1] <= resultFlow)
                {
                    int cost = 0;
                    for (v = 0; v < n; v++)
                        for (int w = v + 1; w < n; w++)
                            if (flow[v, w] > 0) cost += a[v, w] + flow[v, w] * flow[v, w];
                    if (j[n - 1] < resultFlow || cost > resultCost) resultCost = cost;
                    resultFlow = j[n - 1];
                }
            }
            else
            {
                per(v, v + 1, j[v]);
            }
        }

        static int Main(string[] args)
        {
            //Console.SetIn(File.OpenText("_input"));
            Parser parser = new Parser();
            while (!parser.SeekEOF)
            {
                n = parser.ReadInt();
                for (int i = 0; i < n * (n - 1) / 2; i++)
                {
                    int v = parser.ReadInt() - 1;
                    int w = parser.ReadInt() - 1;
                    l[v, w] = parser.ReadInt();
                    h[v, w] = parser.ReadInt();
                    a[v, w] = parser.ReadInt();
                }

                resultFlow = int.MaxValue;
                resultCost = 0;
                for (j[0] = 0; j[0] <= 25; j[0]++)
                    visit(0);

                if (resultFlow == int.MaxValue) resultFlow = resultCost = -1;
                Console.WriteLine(resultFlow + " " + resultCost);
            }

            return 0;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using Solver.Ex;
using Debug = System.Diagnostics.Debug;
using Watch = System.Diagnostics.Stopwatch;
using StringBuilder = System.Text.StringBuilder;
using System.Numerics;
namespace Solver
{
    public class Solver
    {
        public void Solve()
        {
            var n = sc.Integer();
            var m = sc.Integer();
            if (n == 1)
                IO.Printer.Out.WriteLine("1.000000");
            else
            {
                double N = n;
                double M = m;
                var p = 1 / N;
                var q = (N - 1) / (N * M - 1);
                IO.Printer.Out.WriteLine(p+(1-p)*q);
            }
        }

        internal IO.StreamScanner sc;
        static T[] Enumerate<T>(int n, Func<int, T> f) { var a = new T[n]; for (int i = 0; i < n; i++) a[i] = f(i); return a; }
    }

    #region Main and Settings
    static class Program
    {
        static void Main(string[] arg)
        {
#if DEBUG
            var errStream = new System.IO.FileStream(@"..\..\dbg.out", System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
            Debug.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(errStream, "debugStream"));
            Debug.AutoFlush = false;
            var sw = new Watch(); sw.Start();
            IO.Printer.Out.AutoFlush = true;
            try
            {
#endif

                var solver = new Solver();
                solver.sc = new IO.StreamScanner(Console.OpenStandardInput());
                solver.Solve();
                IO.Printer.Out.Flush();
#if DEBUG
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.Message);
                Console.Error.WriteLine(ex.StackTrace);
            }
            finally
            {
                sw.Stop();
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Error.WriteLine("Time:{0}ms", sw.ElapsedMilliseconds);
                Debug.Close();
                System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
            }
#endif
        }

    }
    #endregion
}

#region IO Helper
namespace Solver.IO
{
    public class Printer : System.IO.StreamWriter
    {
        static Printer()
        {
            Out = new Printer(Console.OpenStandardOutput()) { AutoFlush = false };
#if DEBUG
            Error = new Printer(Console.OpenStandardError()) { AutoFlush = true };
#else
            Error = new Printer(System.IO.Stream.Null) { AutoFlush = false };
#endif
        }
        public static Printer Out { get; set; }
        public static Printer Error { get; set; }
        public override IFormatProvider FormatProvider { get { return System.Globalization.CultureInfo.InvariantCulture; } }
        public Printer(System.IO.Stream stream) : base(stream, new System.Text.UTF8Encoding(false, true)) { }
        public Printer(System.IO.Stream stream, System.Text.Encoding encoding) : base(stream, encoding) { }
        public void Write<T>(string format, IEnumerable<T> source) { base.Write(format, source.OfType<object>().ToArray()); }
        public void WriteLine<T>(string format, IEnumerable<T> source) { base.WriteLine(format, source.OfType<object>().ToArray()); }
    }
    public class StreamScanner
    {
        public StreamScanner(System.IO.Stream stream) { iStream = stream; }
        private readonly System.IO.Stream iStream;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        private bool eof = false;
        public bool IsEndOfStream { get { return eof; } }
        const byte lb = 33, ub = 126, el = 10, cr = 13;
        public byte read()
        {
            if (eof) throw new System.IO.EndOfStreamException();
            if (ptr >= len) { ptr = 0; if ((len = iStream.Read(buf, 0, 1024)) <= 0) { eof = true; return 0; } }
            return buf[ptr++];
        }
        public char Char() { byte b = 0; do b = read(); while (b < lb || ub < b); return (char)b; }
        public char[] Char(int n) { var a = new char[n]; for (int i = 0; i < n; i++) a[i] = Char(); return a; }
        public char[][] Char(int n, int m) { var a = new char[n][]; for (int i = 0; i < n; i++) a[i] = Char(m); return a; }
        public string Scan()
        {
            if (eof) throw new System.IO.EndOfStreamException();
            StringBuilder sb = null;
            var enc = System.Text.UTF8Encoding.Default;
            do
            {
                for (; ptr < len && (buf[ptr] < lb || ub < buf[ptr]); ptr++) ;
                if (ptr < len) break;
                ptr = 0;
                if ((len = iStream.Read(buf, 0, 1024)) <= 0) { eof = true; return ""; }
            } while (true);
            do
            {
                var f = ptr;
                for (; ptr < len; ptr++)
                    if (buf[ptr] < lb || ub < buf[ptr])
                    //if (buf[ptr] == cr || buf[ptr] == el)
                    {
                        string s;
                        if (sb == null) s = enc.GetString(buf, f, ptr - f);
                        else { sb.Append(enc.GetChars(buf, f, ptr - f)); s = sb.ToString(); }
                        ptr++; return s;
                    }
                if (sb == null) sb = new StringBuilder(enc.GetString(buf, f, len - f));
                else sb.Append(enc.GetChars(buf, f, len - f));
                ptr = 0;

            }
            while (!eof && (len = iStream.Read(buf, 0, 1024)) > 0);
            eof = true; return (sb != null) ? sb.ToString() : "";
        }
        public long Long()
        {
            long ret = 0; byte b = 0; bool isMynus = false;
            const byte zr = 48, nn = 57, my = 45;
            do b = read();
            while (b != my && (b < zr || nn < b));
            if (b == my) { isMynus = true; b = read(); }
            for (; true; b = read())
                if (b < zr || nn < b)
                    return isMynus ? -ret : ret;
                else ret = ret * 10 + b - zr;
        }
        public int Integer()
        {
            int ret = 0; byte b = 0; bool isMynus = false;
            const byte zr = 48, nn = 57, my = 45;
            do b = read();
            while (b != my && (b < zr || nn < b));
            if (b == my) { isMynus = true; b = read(); }
            for (; true; b = read())
                if (b < zr || nn < b)
                    return isMynus ? -ret : ret;
                else ret = ret * 10 + b - zr;
        }
        public double Double() { return double.Parse(Scan(), System.Globalization.CultureInfo.InvariantCulture); }
        public string[] Scan(int n) { var a = new string[n]; for (int i = 0; i < n; i++) a[i] = Scan(); return a; }
        public double[] Double(int n) { var a = new double[n]; for (int i = 0; i < n; i++) a[i] = Double(); return a; }
        public int[] Integer(int n) { var a = new int[n]; for (int i = 0; i < n; i++) a[i] = Integer(); return a; }
        public long[] Long(int n) { var a = new long[n]; for (int i = 0; i < n; i++)a[i] = Long(); return a; }
        public void Flush() { iStream.Flush(); }
    }
}
#endregion
#region Extension
namespace Solver.Ex
{
    static public partial class EnumerableEx
    {
        static public string AsString(this IEnumerable<char> ie) { return new string(ie.ToArray()); }
        static public string AsJoinedString<T>(this IEnumerable<T> ie, string st = " ") { return string.Join(st, ie); }

    }
}
#endregion


using System;
using System.IO;
using System.Linq;

namespace Codeforces.MemSql
{
    public class Task_C
    {
        static void Main(string[] args)
        {
#if !ONLINE_JUDGE
            Console.SetIn(new StreamReader(@"input.txt"));
#endif
            new Task_C().Solve();
        }

        private void Solve()
        {
            var parts = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var n = parts[0];
            var m = parts[1];

            if (n == 1)
            {
                Console.WriteLine(1);
            }
            else
            {
                var p = (1.0 / n) + ((n - 1.0) / n) * (m - 1.0) / (m * n - 1.0);
                Console.WriteLine(p.ToString().Replace(',', '.'));
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace Codeforces.R355.D
{
    public static class Solver
    {
        public static void Main()
        {
            using (var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false })
            {
                Solve(Console.In, sw);
            }
        }

        public static void Solve(TextReader tr, TextWriter tw)
        {
            WriteAnswer(tw, Parse(tr));
        }

        struct Answer
        {
            public string Winner;
        }

        private static void WriteAnswer(TextWriter tw, Answer answer)
        {
            tw.WriteLine(answer.Winner);
        }

        private static Answer Parse(TextReader tr)
        {
            var n = int.Parse(tr.ReadLine());
            var board = new string[n];
            for (var i = 0; i < n; ++i)
                board[i] = tr.ReadLine();
            return Calc(board);
        }

        private static Answer Calc(string[] board)
        {
            var answer = new Answer();
            var memo = new Dictionary<(int, int), int>();
            var r = Rec("" + board[0][0], 1, 0, board, memo);

            if (r > 0)
                answer.Winner = "FIRST";
            else if (r < 0)
                answer.Winner = "SECOND";
            else
                answer.Winner = "DRAW";

            return answer;
        }

        private static int Rec(string str, int mask, int currentC, string[] board, Dictionary<(int, int), int> memo)
        {
            var n = board.Length;
            var numStr = str.Length;

            var key = (numStr, mask);
            if (memo.ContainsKey(key))
                return memo[key];

            if (numStr == n * 2 - 1)
            {
                if (str.Last() == 'a')
                    return 1;
                else if (str.Last() == 'b')
                    return -1;
                return 0;
            }

            var res = numStr % 2 == 0 ? int.MinValue : int.MaxValue;

            for (var ch = 'a'; ch <= 'z'; ++ch)
            {
                var nm = 0;

                for (var y = 0; y < n; ++y)
                {
                    if ((mask & (1 << y)) == 0)
                        continue;
                    var x = numStr - y - 1;
                    if (x < 0 || x >= n)
                        continue;
                    if (x < n - 1 && board[y][x + 1] == ch)
                        nm |= 1 << y;
                    if (y < n - 1 && board[y + 1][x] == ch)
                        nm |= 1 << y + 1;
                }
                if (nm == 0)
                    continue;

                if (numStr % 2 == 0)
                    res = Math.Max(res, Rec(str + ch, nm, 0, board, memo));
                else
                    res = Math.Min(res, Rec(str + ch, nm, 0, board, memo));
            }

            if (str.Last() == 'a')
                res += 1;
            else if (str.Last() == 'b')
                res += -1;

            return memo[key] = res;
        }
    }
}


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

// (づ°ω°)づﾐ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    private int n;

    private string[] table;
    private int?[,] mem;

    List<Tuple<int, int>> Decode(int x, int mask)
    {
        var ret = new List<Tuple<int, int>>();
        if (x >= n)
        {
            int d = x - n;
            for (int i = 0; i < n - 1 - d; i++)
                if ((mask >> i & 1) == 1)
                    ret.Add(Tuple.Create(d + 1 + i, n - 1 - i));
        }
        else
        {
            for (int i = 0; i <= x; i++)
                if ((mask >> i & 1) == 1)
                    ret.Add(Tuple.Create(i, x - i));
        }
        return ret;
    }

    int Encode(int r, int c)
    {
        if (r + c >= n)
            return 1 << n - c - 1;
        return 1 << r;
    }

    int Fun(int x, int mask)
    {
        if (mem[x, mask].HasValue)
            return mem[x, mask].Value;

        if (x == 2 * (n - 1))
            return 0;

        var cpos = Decode(x, mask);

        int ret = x % 2 == 1 ? int.MinValue : int.MaxValue;
        for (char ch = 'a'; ch <= 'z'; ch++)
        {
            int nmask = 0;
            foreach (var p in cpos)
            {
                if (p.Item1 + 1 < n && table[p.Item1 + 1][p.Item2] == ch)
                    nmask |= Encode(p.Item1 + 1, p.Item2);
                if (p.Item2 + 1 < n && table[p.Item1][p.Item2 + 1] == ch)
                    nmask |= Encode(p.Item1, p.Item2 + 1);
            }
            if (nmask > 0)
            {
                int y = Fun(x + 1, nmask);
                if (ch == 'a')
                    y++;
                else if (ch == 'b')
                    y--;
                if (x % 2 == 1)
                    ret = Math.Max(ret, y);
                else
                    ret = Math.Min(ret, y);
            }
        }

        return (mem[x, mask] = ret).Value;
    }

    public object Solve()
    {
        n = ReadInt();
        table = ReadLines(n);

        mem = new int?[n << 1,1 << n];
        int r = Fun(0, 1);
        if (table[0][0] == 'a')
            r++;
        if (table[0][0] == 'b')
            r--;

        return r > 0 ? "FIRST" : (r == 0 ? "DRAW" : "SECOND");
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;

    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
#endif
        try
        {
            var ts = DateTime.Now;
            object result = new Solver().Solve();
            if (result != null)
                writer.WriteLine(result);
        }
        catch (Exception ex)
        {
#if DEBUG
            Console.WriteLine(ex);
#else
            Console.WriteLine(ex);
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read/Write

    private static Queue<string> currentLineTokens = new Queue<string>();

    private static string[] ReadAndSplitLine()
    {
        return reader.ReadLine().Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public static string ReadToken()
    {
        while (currentLineTokens.Count == 0)
            currentLineTokens = new Queue<string>(ReadAndSplitLine());
        return currentLineTokens.Dequeue();
    }

    public static int ReadInt()
    {
        return int.Parse(ReadToken());
    }

    public static long ReadLong()
    {
        return long.Parse(ReadToken());
    }

    public static double ReadDouble()
    {
        return double.Parse(ReadToken(), CultureInfo.InvariantCulture);
    }

    public static int[] ReadIntArray()
    {
        return ReadAndSplitLine().Select(int.Parse).ToArray();
    }

    public static long[] ReadLongArray()
    {
        return ReadAndSplitLine().Select(long.Parse).ToArray();
    }

    public static double[] ReadDoubleArray()
    {
        return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();
    }

    public static int[][] ReadIntMatrix(int numberOfRows)
    {
        int[][] matrix = new int[numberOfRows][];
        for (int i = 0; i < numberOfRows; i++)
            matrix[i] = ReadIntArray();
        return matrix;
    }

    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows);
        int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++)
        {
            ret[i] = new int[numberOfRows];
            for (int j = 0; j < numberOfRows; j++)
                ret[i][j] = matrix[j][i];
        }
        return ret;
    }

    public static string[] ReadLines(int quantity)
    {
        string[] lines = new string[quantity];
        for (int i = 0; i < quantity; i++)
            lines[i] = reader.ReadLine().Trim();
        return lines;
    }

    public static void WriteArray<T>(params T[] array)
    {
        writer.WriteLine(string.Join(" ", array));
    }

    #endregion
}


using System;
using System.IO;
using System.Text;

namespace Indivisibility
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            long n = long.Parse(reader.ReadLine());

            var divs = new[]
                           {
                               new[] {2, 3, 5, 7},
                               new[] {6, 10, 15, 14, 21, 35},
                               new[] {30, 42, 70, 105},
                               new[] {210}
                           };

            long sum = n;
            int sign = -1;

            for (int i = 0; i < divs.Length; i++)
            {
                for (int j = 0; j < divs[i].Length; j++)
                {
                    sum += sign*n/divs[i][j];
                }
                sign = -sign;
            }

            writer.WriteLine(sum);
            writer.Flush();
        }
    }
}


using System;

namespace K
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			long N = //long.Parse(Console.ReadLine());
				Convert.ToInt64(Console.ReadLine());
			Console.WriteLine(N - N / 2 - N / 3 - N / 5 - N / 7
				+ N / 6 + N / 10 + N / 14 + N / 15 + N / 21 + N / 35
				- N / 30 - N / 42 - N / 70 - N / 105
				+ N / 210);
		}
	}
}


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

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){

		long ng=0;
		long[] P=new long[]{2,3,5,7};
		for(int i=1;i<(1<<4);i++){
			int bc=0;
			long div=1;
			for(int j=0;j<4;j++){
				if(((i>>j)&1)==1){
					bc++;
					div*=P[j];
				}
			}

			if(bc%2==1){
				ng+=N/div;
			}else{
				ng-=N/div;
			}
		}
		Console.WriteLine(N-ng);
	}
	long N;
	public Sol(){
		N=rl();
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputStringSplit = Console.ReadLine().Split(new char[] { ' ' }).Select(x => long.Parse(x)).ToList();
            //long x1 = inputStringSplit[0], y1 = inputStringSplit[1], x2 = inputStringSplit[2], y2 = inputStringSplit[3], shortX, longX, shortY, longY;
            //Console.WriteLine(Math.Pow(1.000000011, inputStringSplit.ElementAt(1)) * inputStringSplit.ElementAt(0));
            //longX = longY = shortY = shortX = 0;
            //if ((x1 % 2 == 0 && x2 % 2 == 1) || (x1 % 2 == 1 && x2 % 2 == 0))
            //{
            //    shortX = longX = Math.Abs(x2 - x1 + 1) / 2;
            //}
            //if (x1 % 2 == 1 && x2 % 2 == 1)
            //{
            //    longX = Math.Abs(x2 - x1 + 1) / 2 + 1;
            //    shortX = Math.Abs(x2 - x1 + 1) / 2;
            //}
            //if (x1 % 2 == 0 && x2 % 2 == 0)
            //{
            //    shortX = Math.Abs(x2 - x1 + 1) / 2 + 1;
            //    longX = Math.Abs(x2 - x1 + 1) / 2;
            //}
            //if ((y1 % 2 == 0 && y2 % 2 == 1) || (y1 % 2 == 1 && y2 % 2 == 0))
            //{
            //    shortY = longY = Math.Abs(y2 - y1 + 1) / 2;
            //}
            //if (y1 % 2 == 1 && y2 % 2 == 1)
            //{
            //    longY = Math.Abs(y2 - y1 + 1) / 2 + 1;
            //    shortY = Math.Abs(y2 - y1 + 1) / 2;
            //}
            //if (y1 % 2 == 0 && y2 % 2 == 0)
            //{
            //    shortY = Math.Abs(y2 - y1 + 1) / 2 + 1;
            //    longY = Math.Abs(y2 - y1 + 1) / 2;
            //}
            //Console.WriteLine(shortX * shortY + longX * longY);
            var n = inputStringSplit[0];
            var res = n - n / 2 - n / 5 - n / 7 - n / 3 + n / 6 + n / 10 + n / 14 + n / 15 + n / 21 - n / 30 + n / 35 - n / 42 - n / 70 - n / 105 + n / 210;
            Console.WriteLine(res);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

namespace ConsoleApplication4
{

    class Program
    {
                static void Main(string[] args)
        {
            BigInteger n = Convert.ToUInt64(Console.ReadLine());
            BigInteger t = n-n / 2 - n / 3 - n / 5 - n / 7+n/6+n/10+n/14+n/15+n/21+n/35-n/30-n/42-n/70-n/105+n/210 ;

            Console.WriteLine(t);

        }
    }
}


using System;

namespace K
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			long N = long.Parse(Console.ReadLine());
			Console.WriteLine(N - N / 2 - N / 3 - N / 5 - N / 7
				+ N / 6 + N / 10 + N / 14 + N / 15 + N / 21 + N / 35
				- N / 30 - N / 42 - N / 70 - N / 105
				+ N / 210);
		}
	}
}


using System;
using Math = System.Math;
using Dec = System.Decimal;
using System.Globalization;
using System.Linq;

namespace taskA
{
	class newDecimal {
	private
			Int64 Z, F, kol;
	public newDecimal(decimal t, Int64 Kol) {
			kol = Kol;
			Z = Dec.ToInt64 (t);
			Int64 p = 1;
			for (int i = 0; i < kol; i ++)
				p *= 10L;
			F = Dec.ToInt64 ((t - Z) * p);
		}
		public void print () {
			Console.Write ("{0}.", Z);
			int sz = F.ToString ().Length;
			for (int i = 0; i < kol - sz; i ++)
				Console.Write (0);
			Console.Write (F);
		}
	}

	class MainClass
	{
		public static long[,] C = new long[800, 10];

		public static void PreCalc() {
			C [1,1] = 1L;
			C [2,1] = 2L;
			C [2,2] = 1L;
			for (int i = 3; i <= 777; i ++) C[i,1] = 1L*i;
			for (int i = 3; i <= 777; i ++)
				for (int j = 2; j <= 7; j ++)
					C [i,j] = C [i - 1,j] + C [i - 1,j - 1];
		}

		public static void Main(string[] args) {
			long n = long.Parse (Console.ReadLine ());
			int[] a = {2, 3, 5, 7};
			long ans = n;
			for (int i = 0; i < 4; i ++) ans -= n / a[i];
			for (int i = 0; i < 4; i ++)
				for (int j = i + 1; j < 4; j ++)
					ans += n / a[i] / a[j];
			for (int i = 0; i < 4; i ++)
				for (int j = i + 1; j < 4; j ++)
					for (int k = j + 1; k < 4; k ++)
						ans -= n / a[i] / a[j] / a[k];
			ans += n / 2 / 3/ 5/ 7;
			Console.WriteLine(ans);
		}
	}
}


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

namespace ChallengePennants
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            long n = long.Parse(s);
            if (n <= 10)
            {
                Console.WriteLine(1);
            }
            else
            {
                long x = n / 2 + n / 3 + n / 5 + n / 7;
                x -= n / 6 + n / 10 + n / 14 + n / 15 + n / 21 + n / 35;
                x += n / 30 + n / 42 + n / 70 + n / 105;
                x -= n / 210;
                Console.WriteLine("{0:d}", n - x);
            }
        }
    }
}


using System;

namespace K
{
    class Program
    {
        static void Main(string[] args)
        {
            ulong n = UInt64.Parse(Console.ReadLine());
            Console.Write(n - (n/2 + n/3 + n/5 + n/7 - n/6 - n/10 - n/14 - n/15 - n/21 - n/35 + n/30 + n/42 + n/105 + n/70 - n/210));
        }
    }
}


using System;
using System.Linq;
using System.Globalization;

namespace _630
{
    class Program
    {
        static void Main()
        {
            var n = long.Parse(Console.ReadLine());
            var ans = n / 2 + n / 3 + n / 5 + n / 7 - n / 6 - n / 10 - n / 14 - n / 15  - n / 21 -
                n / 35 + n / 30 + n / 42 + n / 70 + n / 105 - n / 210;
            ans = n - ans;
            Console.WriteLine(ans);

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Numerics;
using E = System.Linq.Enumerable;

namespace Prob11 {
    class Program {
        protected IOHelper io;

        public Program(string inputFile, string outputFile) {
            io = new IOHelper(inputFile, outputFile, Encoding.Default);

            long n=long.Parse(io.NextToken());
            long ans = n;
            ans -= n / 2+n/3+n/5+n/7;
            ans += n / 6 + n / 10 + n / 14 + n / 15+n/21+n/35;
            ans -= n / 30 + n / 42 + n / 70 + n / 105;
            ans += n / 210;
            io.WriteLine(ans);

            io.Dispose();
        }

        static void Main(string[] args) {
            Program myProgram = new Program(null, null);
        }
    }

    class IOHelper : IDisposable {
        public StreamReader reader;
        public StreamWriter writer;

        public IOHelper(string inputFile, string outputFile, Encoding encoding) {
            if (inputFile == null)
                reader = new StreamReader(Console.OpenStandardInput(), encoding);
            else
                reader = new StreamReader(inputFile, encoding);

            if (outputFile == null)
                writer = new StreamWriter(Console.OpenStandardOutput(), encoding);
            else
                writer = new StreamWriter(outputFile, false, encoding);

            curLine = new string[] { };
            curTokenIdx = 0;
        }

        string[] curLine;
        int curTokenIdx;

        char[] whiteSpaces = new char[] { ' ', '\t', '\r', '\n' };

        public bool hasNext() {
            if (curTokenIdx >= curLine.Length) {
                //Read next line
                string line = reader.ReadLine();
                if (line != null)
                    curLine = line.Split(whiteSpaces, StringSplitOptions.RemoveEmptyEntries);
                else
                    curLine = new string[] { };
                curTokenIdx = 0;
            }

            return curTokenIdx < curLine.Length;
        }

        public string NextToken() {
            return hasNext() ? curLine[curTokenIdx++] : null;
        }

        public int NextInt() {
            return int.Parse(NextToken());
        }

        public double NextDouble() {
            string tkn = NextToken();
            return double.Parse(tkn, System.Globalization.CultureInfo.InvariantCulture);
        }

        public void Write(double val, int precision) {
            writer.Write(val.ToString("F" + precision, System.Globalization.CultureInfo.InvariantCulture));
        }

        public void Write(object stringToWrite) {
            writer.Write(stringToWrite);
        }

        public void WriteLine(double val, int precision) {
            writer.WriteLine(val.ToString("F" + precision, System.Globalization.CultureInfo.InvariantCulture));
        }

        public void WriteLine(object stringToWrite) {
            writer.WriteLine(stringToWrite);
        }

        public void Dispose() {
            try {
                if (reader != null) {
                    reader.Dispose();
                }
                if (writer != null) {
                    writer.Flush();
                    writer.Dispose();
                }
            } catch { };
        }

        public void Flush() {
            if (writer != null) {
                writer.Flush();
            }
        }
    }
}


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Numerics;

namespace ConsoleApplication1
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;
        private int index = 0;
        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }
        class Cut
        {
            public int a;
            public int b;
            public int line;
        }
        object Get()
        {
            checked
            {
                var n = ReadLong();
                var x = 2 * 3 * 5 * 7;
                var count = 0;
                for (int i = 1; i < x; i++)
                    if (i % 2 != 0 && i % 3 != 0 && i % 5 != 0 && i % 7 != 0)
                        count++;
                var result = 0;
                var rem = n % x;
                for (int i = 1; i <= rem; i++)
                    if (i % 2 != 0 && i % 3 != 0 && i % 5 != 0 && i % 7 != 0)
                        result++;
                return (n / x) * count + result;

            }
        }

        public long FastPow(long x, long pow)
        {
            if (pow == 0) return 1;
            if (pow == 1)
                return x;
            if ((pow & 1) == 0)
                return FastPow(x * x, pow / 2);
            return x * FastPow(x, pow - 1);
        }
        object Get2()
        {
            FileName = "strange";
            checked
            {
                var s = Read();
                var first = GetNext(s);
                var second = GetNext(s);
                var single = new Dictionary<char, int>();
                var twin = new Dictionary<Tuple<char, char>, List<Tuple<long, long>>>();
                single[first.Item1] = first.Item2;
                if (second == null)
                    return first.Item2;
                do
                {
                    if (!single.ContainsKey(second.Item1) || single[second.Item1] < second.Item2)
                        single[second.Item1] = second.Item2;
                    var pair = Tuple.Create(first.Item1, second.Item1);
                    if (!twin.ContainsKey(pair))
                        twin[pair] = new List<Tuple<long, long>>();
                    twin[pair].Add(Tuple.Create((long)first.Item2, (long)second.Item2));
                    first = second;
                    second = GetNext(s);
                } while (second != null);
                long result = single.Select(x => x.Value).Sum();
                foreach (var kv in twin)
                    result += ProcessPair(kv.Value);
                return result;
            }
        }

        public long ProcessPair(List<Tuple<long, long>> counts)
        {
            checked
            {
                var sorted = counts.OrderByDescending(x => x.Item1).ThenByDescending(x => x.Item2).ToArray();
                var filtered = new List<Tuple<long, long>>() { sorted[0] };
                for (int i = 1; i < sorted.Length; i++)
                    if (sorted[i].Item2 > filtered.Last().Item2)
                        filtered.Add(sorted[i]);

                var previous = filtered[0];
                var result = previous.Item1 * previous.Item2;
                for (int i = 1; i < filtered.Count; i++)
                    result += (filtered[i].Item2 - previous.Item2) * filtered[i].Item1;
                return result;
            }
        }

        public Tuple<char, int> GetNext(string s)
        {
            if (index == s.Length)
                return null;
            var ch = s[index];
            var count = 0;
            while (index < s.Length && ch == s[index])
            {
                count++;
                index++;
            }
            return Tuple.Create(ch, count);
        }

        public double ProcessPair(long[] a, long[] b, int p)
        {
            return ((double)NumberOfDivs(a, p) * 2000) / Count(a) +
                ((double)NumberOfDivs(b, p) * 2000) / Count(b) -
                ((double)(NumberOfDivs(a, p) * NumberOfDivs(b, p))) * 2000 / (Count(a) * Count(b));
        }

        public long NumberOfDivs(long[] a, int p)
        {
            return a[1] / p - (a[0] - 1) / p;
        }

        public long Count(long[] a)
        {
            return a[1] - a[0] + 1;
        }

        bool DoubleEquals(double a, double b)
        {
            return Math.Abs(a - b) < 0.0000000001;
        }

        bool SameLine(double[] a, double[] b, double[] c)
        {
            var x = a[0];
            var y = a[1];
            var x1 = b[0];
            var y1 = b[1];
            var x2 = c[0];
            var y2 = c[1];
            return DoubleEquals((x - x1) * (y2 - y1), (y - y1) * (x2 - x1));
        }

        double Distance(double[] a, double[] b)
        {
            return Math.Sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]));
        }

        object Get7()
        {
            checked
            {
                var m = ReadInt();
                var p = ReadLongs();
                var arr = p.GroupBy(x => x).Select(g => new { g.Key, Count = g.Count() }).ToArray();
                var even = arr.Where(x => (x.Count & 1) == 0).FirstOrDefault();
                if (even != null)
                {
                    var index = Array.IndexOf(arr, even);
                    //arr[index].Count = arr[index].Count / 2;
                }
                long divs = 1;
                long result = 1;
                foreach (var a in arr)
                {
                    var pi = a.Key;
                    var curr = pi;
                    var olddivs = divs;
                    var oldres = result;
                    for (int i = 0; i < a.Count; i++)
                    {
                        result = (result * oldres % commonMod) * FastPow(curr, olddivs, commonMod) % commonMod;
                        curr = curr * pi % commonMod;
                        divs = (divs + olddivs) % (commonMod - 1);
                    }
                }
                return result;
            }
        }

        public long FastPow(long x, BigInteger pow, long mod)
        {
            if (pow == 0)
                return 1;
            if ((pow & 1) == 0)
                return FastPow(x * x % mod, pow / 2, mod);
            return x * FastPow(x, pow - 1, mod) % mod;
        }

        //object Get3()
        //{
        //    FileName = "";
        //    checked
        //    {
        //        var n = ReadInt();
        //        var hor = new List<Cut>();
        //        var ver = new List<Cut>();
        //        for (int i = 0; i < n; i++)
        //        {
        //            var a = ReadInts();
        //            if (a[0] == a[2])
        //                ver.Add(new Cut() { a = Math.Min(a[1], a[3]), b = Math.Max(a[1], a[3]), line = a[0] });
        //            else
        //                hor.Add(new Cut() { a = Math.Min(a[0], a[2]), b = Math.Max(a[0], a[2]), line = a[1] });
        //        }
        //        ver = Merge(ver);
        //        hor = Merge(hor);

        //    }
        //}

        List<Cut> Merge(List<Cut> l)
        {
            var a = l.OrderBy(x => x.line).ThenBy(x => x.a).ToArray();
            Cut previous = null;
            var result = new List<Cut>();
            for (int i = 0; i < a.Length; i++)
                if (previous == null)
                    previous = a[i];
                else
                    if (previous.line == a[i].line && previous.b >= a[i].a)
                        previous.b = Math.Max(previous.b, a[i].b);
                    else
                    {
                        result.Add(previous);
                        previous = a[i];
                    }
            if (previous != null)
                result.Add(previous);
            return result;
        }

    }
    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (string.IsNullOrEmpty(FileName))
                return Console.ReadLine();
            if (f == null)
                f = new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName + ".in");
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return Convert.ToInt32(Read());
        }
        protected int[] ReadInts()
        {
            return Read().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            return Read().Split(' ').Select(x => Convert.ToInt64(x)).ToArray();
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName + ".out", r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {
            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-NB-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func)
        {
            T result = default(T);
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }
    }
}


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

namespace ChallengePennants
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            long n = long.Parse(s);
            if (n <= 10)
            {
                Console.WriteLine(0);
            }
            else
            {
                long x = n / 2 + n / 3 + n / 5 + n / 7;
                x -= n / 6 + n / 10 + n / 14 + n / 15 + n / 21 + n / 35;
                x += n / 30 + n / 42 + n / 70 + n / 105;
                x -= n / 210;
                Console.WriteLine("{0:d}", n - x);
            }
        }
    }
}


using System;
using System.Linq;
using System.Globalization;

namespace _630
{
    class Program
    {
        static void Main()
        {
            var n = long.Parse(Console.ReadLine());
            var ans = n / 2 + n / 3 + n / 5 + n / 7 - n / 6 - n / 10 - n / 14 - n / 15 - n / 21 - n / 35 - n / 105 - n / 210;
            ans = n - ans;
            Console.WriteLine(ans);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputStringSplit = Console.ReadLine().Split(new char[] { ' ' }).Select(x => long.Parse(x)).ToList();
            //long x1 = inputStringSplit[0], y1 = inputStringSplit[1], x2 = inputStringSplit[2], y2 = inputStringSplit[3], shortX, longX, shortY, longY;
            //Console.WriteLine(Math.Pow(1.000000011, inputStringSplit.ElementAt(1)) * inputStringSplit.ElementAt(0));
            //longX = longY = shortY = shortX = 0;
            //if ((x1 % 2 == 0 && x2 % 2 == 1) || (x1 % 2 == 1 && x2 % 2 == 0))
            //{
            //    shortX = longX = Math.Abs(x2 - x1 + 1) / 2;
            //}
            //if (x1 % 2 == 1 && x2 % 2 == 1)
            //{
            //    longX = Math.Abs(x2 - x1 + 1) / 2 + 1;
            //    shortX = Math.Abs(x2 - x1 + 1) / 2;
            //}
            //if (x1 % 2 == 0 && x2 % 2 == 0)
            //{
            //    shortX = Math.Abs(x2 - x1 + 1) / 2 + 1;
            //    longX = Math.Abs(x2 - x1 + 1) / 2;
            //}
            //if ((y1 % 2 == 0 && y2 % 2 == 1) || (y1 % 2 == 1 && y2 % 2 == 0))
            //{
            //    shortY = longY = Math.Abs(y2 - y1 + 1) / 2;
            //}
            //if (y1 % 2 == 1 && y2 % 2 == 1)
            //{
            //    longY = Math.Abs(y2 - y1 + 1) / 2 + 1;
            //    shortY = Math.Abs(y2 - y1 + 1) / 2;
            //}
            //if (y1 % 2 == 0 && y2 % 2 == 0)
            //{
            //    shortY = Math.Abs(y2 - y1 + 1) / 2 + 1;
            //    longY = Math.Abs(y2 - y1 + 1) / 2;
            //}
            //Console.WriteLine(shortX * shortY + longX * longY);
            var n = inputStringSplit[0];
            var res = n - n / 2 - n / 5 - n / 7 - n / 3 + n / 6 + n / 10 + n / 14 + n / 15 + n / 21 - n / 30 + n / 35 - n / 42 - n / 70 - n / 105 + n / 210;
            Console.WriteLine(n);
        }
    }
}


using System;

namespace K
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			long N = long.Parse(Console.ReadLine());
			Console.WriteLine(N - N / 2 - N / 3 - N / 5 - N / 7 + N / 6 + N / 10);
		}
	}
}


using System;
using System.Linq;
using System.Globalization;

namespace _630
{
    class Program
    {
        static void Main()
        {
            var n = long.Parse(Console.ReadLine());
            var ans = n / 2 + n / 3 + n / 5 + n / 7 + n / 6 + n / 10 + n / 14 + n / 15  + n / 21 +
                n / 35 - n / 30 - n / 42 - n / 70 - n / 105 + n / 210;
            ans = n - ans;
            Console.WriteLine(ans);

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

namespace ConsoleApplication4
{

    class Program
    {
                static void Main(string[] args)
        {
            BigInteger n = Convert.ToUInt64(Console.ReadLine());
            BigInteger t = n / 2 + n / 5 + n / 7 + n / 3 - n / 6 - n / 10 - n / 14 - n / 15 - n / 21 - n / 35;
            t -= n; t = -t;

            Console.WriteLine(t);

        }
    }
}


using System;
using System.IO;
using System.Text;

namespace Indivisibility
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            long n = long.Parse(reader.ReadLine());

            var divs = new[]
                           {
                               new[] {2, 3, 5, 7},
                               new[] {6, 10, 15, 14, 21, 35},
                               new[] {30, 42, 105},
                               new[] {210}
                           };

            long sum = n;
            int sign = -1;

            for (int i = 0; i < divs.Length; i++)
            {
                for (int j = 0; j < divs[i].Length; j++)
                {
                    sum += sign*n/divs[i][j];
                }
                sign = -sign;
            }

            writer.WriteLine(sum);
            writer.Flush();
        }
    }
}


using System;
using System.Collections.Generic;
class Program
{
	static void Main(string[] args)
	{
		int N = int.Parse(Console.ReadLine());
		int[]A = new int[N];
		string[]str = Console.ReadLine().Split();
		int min = 999999999;
		for(var i=0;i<N;i++){
			A[i] = int.Parse(str[i]);
			min = Math.Min(A[i],min);
		}
		int ct = 0;
		for(var i=0;i<N;i++){
			if(A[i]==min){
				ct++;
			}
		}
		string ans = "";
		if(ct > N/2){
			ans = "Bob";
		} else {
			ans = "Alice";
		}
		Console.WriteLine(ans);
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;
using System.Text;
using System.Diagnostics;
using static util;
using P = pair<int, int>;

class Program {
    static void Main(string[] args) {
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        var solver = new Solver(sw);
        // var t = new Thread(solver.solve, 1 << 26); // 64 MB
        // t.Start();
        // t.Join();
        solver.solve();
        sw.Flush();
    }
}

class Solver {
    StreamWriter sw;
    Scan sc;
    void Prt(string a) => sw.WriteLine(a);
    void Prt<T>(IEnumerable<T> a) => Prt(string.Join(" ", a));
    void Prt(params object[] a) => Prt(string.Join(" ", a));
    public Solver(StreamWriter sw) {
        this.sw = sw;
        this.sc = new Scan();
    }

    public void solve() {
        int n = sc.Int;
        if (n == 1) {
            Prt(1);
            return;
        }
        int m = 1;
        while (m <= n) m *= 2;
        int c = 0;
        for (int i = m / 2; i < m; ++i)
        {
            int bc = bitcnt(i);
            int next = -1;
            int p = i;
            while (p > 0) {
                if (p % 2 == 0) {
                    next = p / 2;
                    break;
                }
                p >>= 1;
            }
            if (next != -1 && bc % 2 != bitcnt(next) % 2) {
                ++c;
            }
        }
        // DBG(c);
        if (m / 2 - 1 + c == n || m / 2 - 1 + c + 1 == n) {
            Prt(1);
        }
        else Prt(0);

    }
    int bitcnt(int a) {
        int ret = 0;
        while (a > 0) {
            ret += a & 1;
            a >>= 1;
        }
        return ret;
    }
}

class pair<T, U> : IComparable<pair<T, U>> {
    public T v1;
    public U v2;
    public pair() : this(default(T), default(U)) {}
    public pair(T v1, U v2) { this.v1 = v1; this.v2 = v2; }
    public int CompareTo(pair<T, U> a) {
        int c = Comparer<T>.Default.Compare(v1, a.v1);
        return c != 0 ? c : Comparer<U>.Default.Compare(v2, a.v2);
    }
    public override string ToString() => v1 + " " + v2;
    public void Deconstruct(out T a, out U b) { a = v1; b = v2; }
}
static class util {
    public static readonly int M = 1000000007;
    // public static readonly int M = 998244353;
    public static readonly long LM = 1L << 60;
    public static readonly double eps = 1e-11;
    public static void DBG(string a) => Console.Error.WriteLine(a);
    public static void DBG<T>(IEnumerable<T> a) => DBG(string.Join(" ", a));
    public static void DBG(params object[] a) => DBG(string.Join(" ", a));
    public static void Assert(bool cond) { if (!cond) throw new Exception(); }
    public static pair<T, U> make_pair<T, U>(T v1, U v2) => new pair<T, U>(v1, v2);
    public static int CompareList<T>(IList<T> a, IList<T> b) where T : IComparable<T> {
        for (int i = 0; i < a.Count && i < b.Count; i++)
            if (a[i].CompareTo(b[i]) != 0) return a[i].CompareTo(b[i]);
        return a.Count.CompareTo(b.Count);
    }
    public static bool inside(int i, int j, int h, int w) => i >= 0 && i < h && j >= 0 && j < w;
    static readonly int[] dd = { 0, 1, 0, -1 };
    // static readonly string dstring = "RDLU";
    public static P[] adjacents(int i, int j)
        => Enumerable.Range(0, dd.Length).Select(k => new P(i + dd[k], j + dd[k ^ 1])).ToArray();
    public static P[] adjacents(int i, int j, int h, int w)
        => Enumerable.Range(0, dd.Length).Select(k => new P(i + dd[k], j + dd[k ^ 1]))
                                         .Where(p => inside(p.v1, p.v2, h, w)).ToArray();
    public static P[] adjacents(this P p) => adjacents(p.v1, p.v2);
    public static P[] adjacents(this P p, int h, int w) => adjacents(p.v1, p.v2, h, w);
    public static Dictionary<T, int> compress<T>(this IEnumerable<T> a)
        => a.Distinct().OrderBy(v => v).Select((v, i) => new { v, i }).ToDictionary(p => p.v, p => p.i);
    public static Dictionary<T, int> compress<T>(params IEnumerable<T>[] a) => compress(a.Aggregate(Enumerable.Union));
    public static int[] compressed<T>(this IEnumerable<T> a) {
        var cmp = a.compress();
        return a.Select(x => cmp[x]).ToArray();
    }
    public static T[] inv<T>(this Dictionary<T, int> dic) {
        var res = new T[dic.Count];
        foreach (var item in dic) res[item.Value] = item.Key;
        return res;
    }
    public static void swap<T>(ref T a, ref T b) where T : struct { var t = a; a = b; b = t; }
    public static void swap<T>(this IList<T> a, int i, int j) where T : struct { var t = a[i]; a[i] = a[j]; a[j] = t; }
    public static T[] copy<T>(this IList<T> a) {
        var ret = new T[a.Count];
        for (int i = 0; i < a.Count; i++) ret[i] = a[i];
        return ret;
    }
}

class Scan {
    StreamReader sr;
    public Scan() { sr = new StreamReader(Console.OpenStandardInput()); }
    public Scan(string path) { sr = new StreamReader(path); }
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public string Str => sr.ReadLine().Trim();
    public pair<T, U> Pair<T, U>() {
        T a; U b;
        Multi(out a, out b);
        return new pair<T, U>(a, b);
    }
    public P P => Pair<int, int>();
    public int[] IntArr => StrArr.Select(int.Parse).ToArray();
    public long[] LongArr => StrArr.Select(long.Parse).ToArray();
    public double[] DoubleArr => StrArr.Select(double.Parse).ToArray();
    public string[] StrArr => Str.Split(new[]{' '}, StringSplitOptions.RemoveEmptyEntries);
    bool eq<T, U>() => typeof(T).Equals(typeof(U));
    T ct<T, U>(U a) => (T)Convert.ChangeType(a, typeof(T));
    T cv<T>(string s) => eq<T, int>()    ? ct<T, int>(int.Parse(s))
                       : eq<T, long>()   ? ct<T, long>(long.Parse(s))
                       : eq<T, double>() ? ct<T, double>(double.Parse(s))
                       : eq<T, char>()   ? ct<T, char>(s[0])
                                         : ct<T, string>(s);
    public void Multi<T>(out T a) => a = cv<T>(Str);
    public void Multi<T, U>(out T a, out U b)
    { var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); }
    public void Multi<T, U, V>(out T a, out U b, out V c)
    { var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]); }
    public void Multi<T, U, V, W>(out T a, out U b, out V c, out W d)
    { var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]); d = cv<W>(ar[3]); }
    public void Multi<T, U, V, W, X>(out T a, out U b, out V c, out W d, out X e)
    { var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]); d = cv<W>(ar[3]); e = cv<X>(ar[4]); }
}


using System;
using System.Collections.Generic;
using System.Linq;
using Debug = System.Diagnostics.Debug;
using SB = System.Text.StringBuilder;
using Number = System.Int64;
using System.Numerics;
using static System.Math;
namespace Program {
    public class Solver {
        Random rnd = new Random ();
        public void Solve () {
            var n = rl;
            var k = rl;
            var m = rl;
            var d = rl;
            BigInteger ans = 0;
            for (var i = 1; i <= d + 1; i++) {
                var min = n / k / i;
                var max = i == 1 ? m : n / k / (i - 1) + 1;
                min = Math.Min (Math.Max (1, min), m);
                max = Math.Min (Math.Max (1, max), m);
                foreach (var x in new BigInteger[] { min, max }) {
                    BigInteger V = n;
                    BigInteger u = x;
                    u *= k;
                    var cnt = 0;
                    while (V >= x && cnt <= d) {
                        V -= u;
                        cnt++;
                    }
                    //Console.Error.WriteLine ($"{x} {cnt}");

                    if (cnt <= d) ans = BigInteger.Max (ans, cnt * x);
                }
            }
            System.Console.WriteLine (ans);

        }
        const long INF = 1L << 60;
        //static int[] dx = { -1, 0, 1, 0 };
        //static int[] dy = { 0, 1, 0, -1 };

        int ri { get { return sc.Integer (); } }
        long rl { get { return sc.Long (); } }
        double rd { get { return sc.Double (); } }
        string rs { get { return sc.Scan (); } }
        public IO.StreamScanner sc = new IO.StreamScanner (Console.OpenStandardInput ());

        static T[] Enumerate<T> (int n, Func<int, T> f) {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f (i);
            return a;
        }
        static public void Swap<T> (ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}
#region main
static class Ex {
    static public string AsString (this IEnumerable<char> ie) { return new string (ie.ToArray ()); }
    static public string AsJoinedString<T> (this IEnumerable<T> ie, string st = " ") {
        return string.Join (st, ie);
    }
    static public void Main () {
        Console.SetOut (new Program.IO.Printer (Console.OpenStandardOutput ()) { AutoFlush = false });
        var solver = new Program.Solver ();
        try {
            solver.Solve ();
            Console.Out.Flush ();
        } catch { }
    }
}
#endregion
#region Ex
namespace Program.IO {
    using System.Globalization;
    using System.IO;
    using System.Text;

    public class Printer : StreamWriter {
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer (Stream stream) : base (stream, new UTF8Encoding (false, true)) { }
    }

    public class StreamScanner {
        public StreamScanner (Stream stream) { str = stream; }

        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }

        private byte read () {
            if (isEof) return 0;
            if (ptr >= len) {
                ptr = 0;
                if ((len = str.Read (buf, 0, 1024)) <= 0) {
                    isEof = true;
                    return 0;
                }
            }
            return buf[ptr++];
        }

        public char Char () {
            byte b = 0;
            do b = read (); while ((b < 33 || 126 < b) && !isEof);
            return (char) b;
        }
        public string Scan () {
            var sb = new StringBuilder ();
            for (var b = Char (); b >= 33 && b <= 126; b = (char) read ()) sb.Append (b);
            return sb.ToString ();
        }
        public string ScanLine () {
            var sb = new StringBuilder ();
            for (var b = Char (); b != '\n' && b != 0; b = (char) read ())
                if (b != '\r') sb.Append (b);
            return sb.ToString ();
        }
        public long Long () { return isEof ? long.MinValue : long.Parse (Scan ()); }
        public int Integer () { return isEof ? int.MinValue : int.Parse (Scan ()); }
        public double Double () { return isEof ? double.NaN : double.Parse (Scan (), CultureInfo.InvariantCulture); }
    }
}
#endregion


using System;
using System.Collections.Generic;
using System.Linq;
using Debug = System.Diagnostics.Debug;
using SB = System.Text.StringBuilder;
using Number = System.Int64;
using System.Numerics;
using static System.Math;
namespace Program {
    public class Solver {
        Random rnd = new Random ();
        public void Solve () {
            var n = rl;
            var k = rl;
            var m = rl;
            var d = rl;
            BigInteger ans = 0;
            for (var i = 1; i <= d + 1; i++) {
                BigInteger min = n;
                BigInteger kk = k;
                kk *= i;
                min /= k;
                kk = k;
                kk *= i - 1;
                var max = i == 1 ? m : n / kk - 1;
                min = BigInteger.Min (BigInteger.Max (1, min), m);
                max = BigInteger.Min (BigInteger.Max (1, max), m);
                foreach (var x in new BigInteger[] { min, max }) {
                    BigInteger V = n;
                    BigInteger u = x;
                    u *= k;
                    var cnt = 0;
                    while (V >= x && cnt <= d) {
                        V -= u;
                        cnt++;
                    }
                    //Console.Error.WriteLine ($"{x} {cnt}");

                    if (cnt <= d) ans = BigInteger.Max (ans, cnt * x);
                }
            }
            System.Console.WriteLine (ans);

        }
        const long INF = 1L << 60;
        //static int[] dx = { -1, 0, 1, 0 };
        //static int[] dy = { 0, 1, 0, -1 };

        int ri { get { return sc.Integer (); } }
        long rl { get { return sc.Long (); } }
        double rd { get { return sc.Double (); } }
        string rs { get { return sc.Scan (); } }
        public IO.StreamScanner sc = new IO.StreamScanner (Console.OpenStandardInput ());

        static T[] Enumerate<T> (int n, Func<int, T> f) {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f (i);
            return a;
        }
        static public void Swap<T> (ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}
#region main
static class Ex {
    static public string AsString (this IEnumerable<char> ie) { return new string (ie.ToArray ()); }
    static public string AsJoinedString<T> (this IEnumerable<T> ie, string st = " ") {
        return string.Join (st, ie);
    }
    static public void Main () {
        Console.SetOut (new Program.IO.Printer (Console.OpenStandardOutput ()) { AutoFlush = false });
        var solver = new Program.Solver ();
        try {
            solver.Solve ();
            Console.Out.Flush ();
        } catch { }
    }
}
#endregion
#region Ex
namespace Program.IO {
    using System.Globalization;
    using System.IO;
    using System.Text;

    public class Printer : StreamWriter {
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer (Stream stream) : base (stream, new UTF8Encoding (false, true)) { }
    }

    public class StreamScanner {
        public StreamScanner (Stream stream) { str = stream; }

        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }

        private byte read () {
            if (isEof) return 0;
            if (ptr >= len) {
                ptr = 0;
                if ((len = str.Read (buf, 0, 1024)) <= 0) {
                    isEof = true;
                    return 0;
                }
            }
            return buf[ptr++];
        }

        public char Char () {
            byte b = 0;
            do b = read (); while ((b < 33 || 126 < b) && !isEof);
            return (char) b;
        }
        public string Scan () {
            var sb = new StringBuilder ();
            for (var b = Char (); b >= 33 && b <= 126; b = (char) read ()) sb.Append (b);
            return sb.ToString ();
        }
        public string ScanLine () {
            var sb = new StringBuilder ();
            for (var b = Char (); b != '\n' && b != 0; b = (char) read ())
                if (b != '\r') sb.Append (b);
            return sb.ToString ();
        }
        public long Long () { return isEof ? long.MinValue : long.Parse (Scan ()); }
        public int Integer () { return isEof ? int.MinValue : int.Parse (Scan ()); }
        public double Double () { return isEof ? double.NaN : double.Parse (Scan (), CultureInfo.InvariantCulture); }
    }
}
#endregion


using System;
using System.Collections.Generic;
using System.Linq;
using Debug = System.Diagnostics.Debug;
using SB = System.Text.StringBuilder;
using Number = System.Int64;
using System.Numerics;
using static System.Math;
namespace Program {
    public class Solver {
        Random rnd = new Random ();
        public void Solve () {
            var n = rl;
            var k = rl;
            var m = rl;
            var d = rl;
            BigInteger ans = 0;
            for (var i = 1; i <= d + 1; i++) {
                BigInteger min = n;
                BigInteger kk = k;
                kk *= i;
                min /= kk;
                kk = k;
                kk *= i - 1;
                kk += 1;
                var max = i == 1 ? m : (n / kk);
                min = BigInteger.Min (BigInteger.Max (1, min), m);
                max = BigInteger.Min (BigInteger.Max (1, max), m);

                foreach (var x in new BigInteger[] { min, max }) {
                    BigInteger V = n;
                    BigInteger u = x;
                    u *= k;
                    var cnt = 0;
                    while (V >= x && cnt <= d) {
                        V -= u;
                        cnt++;
                    }
                    Console.WriteLine ($"{min} {max} {x} {cnt}");

                    if (cnt <= d) ans = BigInteger.Max (ans, cnt * x);
                }
            }
            System.Console.WriteLine (ans);

        }
        const long INF = 1L << 60;
        //static int[] dx = { -1, 0, 1, 0 };
        //static int[] dy = { 0, 1, 0, -1 };

        int ri { get { return sc.Integer (); } }
        long rl { get { return sc.Long (); } }
        double rd { get { return sc.Double (); } }
        string rs { get { return sc.Scan (); } }
        public IO.StreamScanner sc = new IO.StreamScanner (Console.OpenStandardInput ());

        static T[] Enumerate<T> (int n, Func<int, T> f) {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f (i);
            return a;
        }
        static public void Swap<T> (ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}
#region main
static class Ex {
    static public string AsString (this IEnumerable<char> ie) { return new string (ie.ToArray ()); }
    static public string AsJoinedString<T> (this IEnumerable<T> ie, string st = " ") {
        return string.Join (st, ie);
    }
    static public void Main () {
        Console.SetOut (new Program.IO.Printer (Console.OpenStandardOutput ()) { AutoFlush = false });
        var solver = new Program.Solver ();
        try {
            solver.Solve ();
            Console.Out.Flush ();
        } catch { }
    }
}
#endregion
#region Ex
namespace Program.IO {
    using System.Globalization;
    using System.IO;
    using System.Text;

    public class Printer : StreamWriter {
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer (Stream stream) : base (stream, new UTF8Encoding (false, true)) { }
    }

    public class StreamScanner {
        public StreamScanner (Stream stream) { str = stream; }

        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }

        private byte read () {
            if (isEof) return 0;
            if (ptr >= len) {
                ptr = 0;
                if ((len = str.Read (buf, 0, 1024)) <= 0) {
                    isEof = true;
                    return 0;
                }
            }
            return buf[ptr++];
        }

        public char Char () {
            byte b = 0;
            do b = read (); while ((b < 33 || 126 < b) && !isEof);
            return (char) b;
        }
        public string Scan () {
            var sb = new StringBuilder ();
            for (var b = Char (); b >= 33 && b <= 126; b = (char) read ()) sb.Append (b);
            return sb.ToString ();
        }
        public string ScanLine () {
            var sb = new StringBuilder ();
            for (var b = Char (); b != '\n' && b != 0; b = (char) read ())
                if (b != '\r') sb.Append (b);
            return sb.ToString ();
        }
        public long Long () { return isEof ? long.MinValue : long.Parse (Scan ()); }
        public int Integer () { return isEof ? int.MinValue : int.Parse (Scan ()); }
        public double Double () { return isEof ? double.NaN : double.Parse (Scan (), CultureInfo.InvariantCulture); }
    }
}
#endregion


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;
namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            BigInteger n = BigInteger.Parse(s[0]);
            BigInteger k = BigInteger.Parse(s[1]);
            BigInteger M = BigInteger.Parse(s[2]);
            BigInteger D = BigInteger.Parse(s[3]);
            BigInteger ans = new BigInteger();
            ans = 0;
            for (int i = 0; i <= D; i++)
            {

                BigInteger len = i * k + 1;
                BigInteger t = n / len;
                if(t > M)
                {
                    t = M;
                }
                if (t == 0)
                {
                    continue;
                }
                // cout << len << " " << t << endl;
                BigInteger ct = n / t;
                ct = (ct + k - 1) / k;

                BigInteger cur = ct * t;
                // cout << cur << " " << ct << endl;
                if (ct == i + 1 && ct <= D)
                {
                    if(ans < cur)
                    {
                        ans = cur;
                    }
                }

            }
            Console.Write(ans);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Numerics;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string foo = Console.ReadLine();
            string[] tokens = foo.Split(' ');
            List<long> nums = new List<long>();
            foreach (string s in tokens)
                if (long.TryParse(s, out var oneNum))
                    nums.Add(oneNum);

            long n = nums[0], k = nums[1], m = nums[2], d = nums[3];
            var tmp = BigInteger.Divide(10, 4);
            long mx = 0;
            for (long i = 1; i <= d; i++)
            {
                long lo = 1, hi = m;
                while (hi - lo > 1)
                {
                    long mid = (lo + hi) / 2;
                    var value = BigInteger.Divide(BigInteger.Add(n - 1 - n % mid, BigInteger.Multiply(k, mid)),
                        BigInteger.Multiply(k, mid));
                    if (value >= i)
                        lo = mid;
                    else
                        hi = mid;
                }
                var highValue = BigInteger.Divide(BigInteger.Add(n - 1 - n % hi, BigInteger.Multiply(k, hi)), BigInteger.Multiply(k, hi));
                var lowValue = BigInteger.Divide(BigInteger.Add(n - 1 - n % lo, BigInteger.Multiply(k, lo)), BigInteger.Multiply(k, lo));
                if (highValue >= i)
                    mx = Math.Max(mx, hi * i);
                else if (lowValue >= i)
                    mx = Math.Max(mx, lo * i);
            }
            Console.WriteLine(mx);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using Debug = System.Diagnostics.Debug;
using SB = System.Text.StringBuilder;
using Number = System.Int64;
using System.Numerics;
using static System.Math;
namespace Program {
    public class Solver {
        Random rnd = new Random ();
        public void Solve () {
            var n = rl;
            var k = rl;
            var m = rl;
            var d = rl;
            BigInteger ans = 0;
            for (var i = 1; i <= d + 1; i++) {
                BigInteger min = n;
                BigInteger kk = k;
                kk *= i;
                min /= kk;
                kk = k;
                kk *= i - 1;
                kk += 1;
                var max = i == 1 ? m : (n / kk);
                min = BigInteger.Min (BigInteger.Max (1, min), m);
                max = BigInteger.Min (BigInteger.Max (1, max), m);

                foreach (var x in new BigInteger[] { min, max }) {
                    BigInteger V = n;
                    BigInteger u = x;
                    u *= k;
                    var cnt = 0;
                    while (V >= x && cnt <= d) {
                        V -= u;
                        cnt++;
                    }
                    //Console.WriteLine ($"{min} {max} {x} {cnt}");

                    if (cnt <= d) ans = BigInteger.Max (ans, cnt * x);
                }
            }
            System.Console.WriteLine (ans);

        }
        const long INF = 1L << 60;
        //static int[] dx = { -1, 0, 1, 0 };
        //static int[] dy = { 0, 1, 0, -1 };

        int ri { get { return sc.Integer (); } }
        long rl { get { return sc.Long (); } }
        double rd { get { return sc.Double (); } }
        string rs { get { return sc.Scan (); } }
        public IO.StreamScanner sc = new IO.StreamScanner (Console.OpenStandardInput ());

        static T[] Enumerate<T> (int n, Func<int, T> f) {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f (i);
            return a;
        }
        static public void Swap<T> (ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}
#region main
static class Ex {
    static public string AsString (this IEnumerable<char> ie) { return new string (ie.ToArray ()); }
    static public string AsJoinedString<T> (this IEnumerable<T> ie, string st = " ") {
        return string.Join (st, ie);
    }
    static public void Main () {
        Console.SetOut (new Program.IO.Printer (Console.OpenStandardOutput ()) { AutoFlush = false });
        var solver = new Program.Solver ();
        try {
            solver.Solve ();
            Console.Out.Flush ();
        } catch { }
    }
}
#endregion
#region Ex
namespace Program.IO {
    using System.Globalization;
    using System.IO;
    using System.Text;

    public class Printer : StreamWriter {
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer (Stream stream) : base (stream, new UTF8Encoding (false, true)) { }
    }

    public class StreamScanner {
        public StreamScanner (Stream stream) { str = stream; }

        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }

        private byte read () {
            if (isEof) return 0;
            if (ptr >= len) {
                ptr = 0;
                if ((len = str.Read (buf, 0, 1024)) <= 0) {
                    isEof = true;
                    return 0;
                }
            }
            return buf[ptr++];
        }

        public char Char () {
            byte b = 0;
            do b = read (); while ((b < 33 || 126 < b) && !isEof);
            return (char) b;
        }
        public string Scan () {
            var sb = new StringBuilder ();
            for (var b = Char (); b >= 33 && b <= 126; b = (char) read ()) sb.Append (b);
            return sb.ToString ();
        }
        public string ScanLine () {
            var sb = new StringBuilder ();
            for (var b = Char (); b != '\n' && b != 0; b = (char) read ())
                if (b != '\r') sb.Append (b);
            return sb.ToString ();
        }
        public long Long () { return isEof ? long.MinValue : long.Parse (Scan ()); }
        public int Integer () { return isEof ? int.MinValue : int.Parse (Scan ()); }
        public double Double () { return isEof ? double.NaN : double.Parse (Scan (), CultureInfo.InvariantCulture); }
    }
}
#endregion


using System;
using System.Linq;
using CompLib.Util;
using System.Threading;
using CompLib.Mathematics;

public class Program
{
    int N;
    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();
        // 長さ2Nのかっこ列すべて
        // Trieの最大マッチング

        // 木
        // 2色に塗って少ない方

        // 頂点増え方
        // 以降>しか置けない

        // < >>>>>

        //    0 1 2 3
        // 0: 1
        // 1: 1 1 ... 1
        // 2: 2 2 1 ... 3
        // 3: 5 5 3 1
        // 4:

        var dp = new ModInt[N + 1][];
        for (int i = 0; i <= N; i++)
        {
            dp[i] = new ModInt[i + 1];
        }

        dp[0][0] = 1;
        for (int i = 0; i < N; i++)
        {
            ModInt tmp = 0;
            for (int j = i; j >= 0; j--)
            {
                tmp += dp[i][j];
                dp[i + 1][j + 1] = tmp;
            }
            dp[i + 1][0] = tmp;
        }

        ModInt ans = 0;
        for (int i = 0; i < N; i++)
        {
            for (int j = 0; j <= i; j++)
            {
                ans += dp[i][j] * ((j + 2) / 2);
            }
        }

        Console.WriteLine(ans);
    }

    public static void Main(string[] args) => new Program().Solve();
    // public static void Main(string[] args) => new Thread(new Program().Solve, 1 << 27).Start();
}

// https://bitbucket.org/camypaper/complib
namespace CompLib.Mathematics
{
    #region ModInt
    /// <summary>
    /// [0,<see cref="Mod"/>) までの値を取るような数
    /// </summary>
    public struct ModInt
    {
        /// <summary>
        /// 剰余を取る値．
        /// </summary>
        public const long Mod = (int)1e9 + 7;
        // public const long Mod = 998244353;

        /// <summary>
        /// 実際の数値．
        /// </summary>
        public long num;
        /// <summary>
        /// 値が <paramref name="n"/> であるようなインスタンスを構築します．
        /// </summary>
        /// <param name="n">インスタンスが持つ値</param>
        /// <remarks>パフォーマンスの問題上，コンストラクタ内では剰余を取りません．そのため，<paramref name="n"/> ∈ [0,<see cref="Mod"/>) を満たすような <paramref name="n"/> を渡してください．このコンストラクタは O(1) で実行されます．</remarks>
        public ModInt(long n) { num = n; }
        /// <summary>
        /// このインスタンスの数値を文字列に変換します．
        /// </summary>
        /// <returns>[0,<see cref="Mod"/>) の範囲内の整数を 10 進表記したもの．</returns>
        public override string ToString() { return num.ToString(); }
        public static ModInt operator +(ModInt l, ModInt r) { l.num += r.num; if (l.num >= Mod) l.num -= Mod; return l; }
        public static ModInt operator -(ModInt l, ModInt r) { l.num -= r.num; if (l.num < 0) l.num += Mod; return l; }
        public static ModInt operator *(ModInt l, ModInt r) { return new ModInt(l.num * r.num % Mod); }
        public static implicit operator ModInt(long n) { n %= Mod; if (n < 0) n += Mod; return new ModInt(n); }

        /// <summary>
        /// 与えられた 2 つの数値からべき剰余を計算します．
        /// </summary>
        /// <param name="v">べき乗の底</param>
        /// <param name="k">べき指数</param>
        /// <returns>繰り返し二乗法により O(N log N) で実行されます．</returns>
        public static ModInt Pow(ModInt v, long k) { return Pow(v.num, k); }

        /// <summary>
        /// 与えられた 2 つの数値からべき剰余を計算します．
        /// </summary>
        /// <param name="v">べき乗の底</param>
        /// <param name="k">べき指数</param>
        /// <returns>繰り返し二乗法により O(N log N) で実行されます．</returns>
        public static ModInt Pow(long v, long k)
        {
            long ret = 1;
            for (k %= Mod - 1; k > 0; k >>= 1, v = v * v % Mod)
                if ((k & 1) == 1) ret = ret * v % Mod;
            return new ModInt(ret);
        }
        /// <summary>
        /// 与えられた数の逆元を計算します．
        /// </summary>
        /// <param name="v">逆元を取る対象となる数</param>
        /// <returns>逆元となるような値</returns>
        /// <remarks>法が素数であることを仮定して，フェルマーの小定理に従って逆元を O(log N) で計算します．</remarks>
        public static ModInt Inverse(ModInt v) { return Pow(v, Mod - 2); }
    }
    #endregion
    #region Binomial Coefficient
    public class BinomialCoefficient
    {
        public ModInt[] fact, ifact;
        public BinomialCoefficient(int n)
        {
            fact = new ModInt[n + 1];
            ifact = new ModInt[n + 1];
            fact[0] = 1;
            for (int i = 1; i <= n; i++)
                fact[i] = fact[i - 1] * i;
            ifact[n] = ModInt.Inverse(fact[n]);
            for (int i = n - 1; i >= 0; i--)
                ifact[i] = ifact[i + 1] * (i + 1);
            ifact[0] = ifact[1];
        }
        public ModInt this[int n, int r]
        {
            get
            {
                if (n < 0 || n >= fact.Length || r < 0 || r > n) return 0;
                return fact[n] * ifact[n - r] * ifact[r];
            }
        }
        public ModInt RepeatedCombination(int n, int k)
        {
            if (k == 0) return 1;
            return this[n + k - 1, k];
        }
    }
    #endregion
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            if (_index >= _line.Length)
            {
                string s;
                do
                {
                    s = Console.ReadLine();
                } while (s.Length == 0);

                _line = s.Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public string ReadLine()
        {
            _index = _line.Length;
            return Console.ReadLine();
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            string s = Console.ReadLine();
            _line = s.Length == 0 ? new string[0] : s.Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using SB = System.Text.StringBuilder;
//using System.Threading.Tasks;
//using System.Text.RegularExpressions;
//using System.Globalization;
//using System.Diagnostics;
using static System.Console;
using System.Numerics;
using static System.Math;
using pair = Pair<int, int>;

class Program
{
    static void Main()
    {
        //SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
        new Program().solve();
        Out.Flush();
    }
    readonly Scanner cin = new Scanner();
    readonly int[] dd = { 0, 1, 0, -1, 0 }; //→↓←↑
    readonly int mod = 1000000007;
    readonly int dom = 998244353;
    bool chmax<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }
    bool chmin<T>(ref T a, T b) where T : IComparable<T> { if (b.CompareTo(a) < 0) { a = b; return true; } return false; }

    void solve()
    {
        int N = cin.nextint;
        var dp = new ModInt[2 * N + 1, N + 1];
        dp[0, 0] = 1;
        for (int i = 1; i <= 2 * N; i++)
        {
            for (int j = i % 2; j <= Min(N, 2 * N - i); j += 2)
            {
                if (j > 0) dp[i, j] = dp[i - 1, j - 1];
                if (j < N) dp[i, j] += dp[i - 1, j + 1];
            }
        }

        var S = new ModInt[2 * N + 1];
        for (int i = 0; i < S.Length; i++)
        {
            for (int j = 0; j <= N; j++)
            {
                S[i] += dp[i, j];
            }
        }
        S.Reverse();
       // S.join();

        ModInt ans = 0;
        for (int i = 1; i < S.Length; i += 2)
        {
            ans += S[i];
        }
        WriteLine(ans);

        //for (int i = 0; i < N; i++)
        //{
        //    for (int j = 0; j < (i + 1) * 2; j++)
        //    {
        //        dp[j] += 1;
        //    }
        //    if (i > 0) dp[i * 2] += 1;
        //}
        //dp.join();
        //ModInt ans = 1;
        //foreach (var item in dp)
        //{
        //    ans *= item;
        //}
        //WriteLine(ans);
    }

}

/// <OriginalAuthor>camypaper</OriginalAuthor>
class FenwickTree
{
    readonly int n;
    readonly long[] bit;
    readonly int max = 1;
    public FenwickTree(int size)
    {
        n = size; bit = new long[n + 1];
        while ((max << 1) <= n) max <<= 1;
    }
    /// sum[a, b] 0-indexed
    public long this[int i, int j] { get { i++; j++; return i <= j ? this[j] - this[i - 1] : 0; } }
    /// sum[1, i] 1-indexed
    public long this[int i] { get { long s = 0; for (; i > 0; i -= i & -i) s += bit[i]; return s; } }
    public int LowerBound(long w)
    {
        if (w <= 0) return 0;
        int x = 0;
        for (int k = max; k > 0; k >>= 1)
            if (x + k <= n && bit[x + k] < w)
            {
                w -= bit[x + k];
                x += k;
            }
        return x + 1;
    }
    /// add v to bit[i] 0-indexed
    public void Add(int i, long v)
    {
        i++;
        //if (i == 0) System.Diagnostics.Debug.Fail("BIT is 1 indexed");
        for (; i <= n; i += i & -i) bit[i] += v;
    }
    public long[] Items
    {
        get
        {
            var ret = new long[n + 1];
            for (int i = 0; i < ret.Length; i++)
                ret[i] = this[i, i];
            return ret;
        }
    }
}

class RangeAddFenwickTree
{
    readonly int n;
    FenwickTree a, b;
    public RangeAddFenwickTree(int n)
    {
        this.n = n;
        a = new FenwickTree(n);
        b = new FenwickTree(n);
    }
    /// Add V to[i, j] 0-indexed
    public void Add(int i, int j, long v)
    {
        //a.Add(i, -(i - 1) * v); a.Add(j + 1, j * v);
        //b.Add(i, v); b.Add(j + 1, -v);
        a.Add(i, -i * v); a.Add(j + 1, (j + 1) * v);
        b.Add(i, v); b.Add(j + 1, -v);
    }
    /// Sum [1, i] 1-indexed
    public long this[int i] => a[i] + b[i] * i;
    /// Sum [i, j] 0-indexed
    public long this[int i, int j] { get { i++; j++; return i <= j ? this[j] - this[i - 1] : 0; } }
    public long[] Items
    {
        get
        {
            var ret = new long[n + 1];
            for (int i = 0; i < ret.Length; i++)
                ret[i] = this[i, i];
            return ret;
        }
    }
}

///
/// [0,<see cref="Mod"/>) までの値を取るような数
///
/// <OriginalAuthor>camypaper</OriginalAuthor>
struct ModInt
{
    ///
    /// 剰余を取る値．
    ///
    public const long Mod = (int)1e9 + 7;

    ///
    /// 実際の数値．
    ///
    public long num;
    ///
    /// 値が <paramref name="n"/> であるようなインスタンスを構築します．
    ///
    /// <param name="n">インスタンスが持つ値</param>
    /// <remarks>パフォーマンスの問題上，コンストラクタ内では剰余を取りません．そのため，<paramref name="n"/> ∈ [0,<see cref="Mod"/>) を満たすような <paramref name="n"/> を渡してください．このコンストラクタは O(1) で実行されます．</remarks>
    public ModInt(long n) { num = n; }
    ///
    /// このインスタンスの数値を文字列に変換します．
    ///
    /// <returns>[0,<see cref="Mod"/>) の範囲内の整数を 10 進表記したもの．</returns>
    public override string ToString() { return num.ToString(); }
    public static ModInt operator +(ModInt l, ModInt r) { l.num += r.num; if (l.num >= Mod) l.num -= Mod; return l; }
    public static ModInt operator -(ModInt l, ModInt r) { l.num -= r.num; if (l.num < 0) l.num += Mod; return l; }
    public static ModInt operator *(ModInt l, ModInt r) { return new ModInt(l.num * r.num % Mod); }
    public static implicit operator ModInt(long n) { n %= Mod; if (n < 0) n += Mod; return new ModInt(n); }

    ///
    /// 与えられた 2 つの数値からべき剰余を計算します．
    ///
    /// <param name="v">べき乗の底</param>
    /// <param name="k">べき指数</param>
    /// <returns>繰り返し二乗法により O(N log N) で実行されます．</returns>
    public static ModInt Pow(ModInt v, long k) { return Pow(v.num, k); }

    ///
    /// 与えられた 2 つの数値からべき剰余を計算します．
    ///
    /// <param name="v">べき乗の底</param>
    /// <param name="k">べき指数</param>
    /// <returns>繰り返し二乗法により O(N log N) で実行されます．</returns>
    public static ModInt Pow(long v, long k)
    {
        long ret = 1;
        for (k %= Mod - 1; k > 0; k >>= 1, v = v * v % Mod)
            if ((k & 1) == 1) ret = ret * v % Mod;
        return new ModInt(ret);
    }
    ///
    /// 与えられた数の逆元を計算します．
    ///
    /// <param name="v">逆元を取る対象となる数</param>
    /// <returns>逆元となるような値</returns>
    /// <remarks>法が素数であることを仮定して，フェルマーの小定理に従って逆元を O(log N) で計算します．</remarks>
    public static ModInt Inverse(ModInt v) { return Pow(v, Mod - 2); }
}

class BinomialCoefficient
{
    public ModInt[] fact, ifact;
    public BinomialCoefficient(int n)
    {
        fact = new ModInt[n + 1];
        ifact = new ModInt[n + 1];
        fact[0] = 1;
        for (int i = 1; i <= n; i++)
            fact[i] = fact[i - 1] * i;
        ifact[n] = ModInt.Inverse(fact[n]);
        for (int i = n - 1; i >= 0; i--)
            ifact[i] = ifact[i + 1] * (i + 1);
        ifact[0] = ifact[1];
    }
    public ModInt this[int n, int r]
    {
        get
        {
            if (n < 0 || n >= fact.Length || r < 0 || r > n) return 0;
            return fact[n] * ifact[n - r] * ifact[r];
        }
    }
    public ModInt RepeatedCombination(int n, int k)
    {
        if (k == 0) return 1;
        return this[n + k - 1, k];
    }
}

static class Ex
{
    public static void join<T>(this IEnumerable<T> values, string sep = " ") => WriteLine(string.Join(sep, values));
    public static string concat<T>(this IEnumerable<T> values) => string.Concat(values);
    public static string reverse(this string s) { var t = s.ToCharArray(); Array.Reverse(t); return t.concat(); }

    public static int lower_bound<T>(this IList<T> arr, T val) where T : IComparable<T>
    {
        int low = 0, high = arr.Count;
        int mid;
        while (low < high)
        {
            mid = ((high - low) >> 1) + low;
            if (arr[mid].CompareTo(val) < 0) low = mid + 1;
            else high = mid;
        }
        return low;
    }
    public static int upper_bound<T>(this IList<T> arr, T val) where T : IComparable<T>
    {
        int low = 0, high = arr.Count;
        int mid;
        while (low < high)
        {
            mid = ((high - low) >> 1) + low;
            if (arr[mid].CompareTo(val) <= 0) low = mid + 1;
            else high = mid;
        }
        return low;
    }
}

class Pair<T, U> : IComparable<Pair<T, U>> where T : IComparable<T> where U : IComparable
{
    public T f; public U s;
    public Pair(T f, U s) { this.f = f; this.s = s; }
    public int CompareTo(Pair<T, U> a) => f.CompareTo(a.f) != 0 ? f.CompareTo(a.f) : s.CompareTo(a.s);
    public override string ToString() => $"{f} {s}";
}

class Scanner
{
    string[] s; int i;
    readonly char[] cs = new char[] { ' ' };
    public Scanner() { s = new string[0]; i = 0; }
    public string[] scan => ReadLine().Split();
    public int[] scanint => Array.ConvertAll(scan, int.Parse);
    public long[] scanlong => Array.ConvertAll(scan, long.Parse);
    public double[] scandouble => Array.ConvertAll(scan, double.Parse);
    public string next
    {
        get
        {
            if (i < s.Length) return s[i++];
            string st = ReadLine();
            while (st == "") st = ReadLine();
            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            i = 0;
            return next;
        }
    }
    public int nextint => int.Parse(next);
    public long nextlong => long.Parse(next);
    public double nextdouble => double.Parse(next);
}