//#define __debug

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Security;

namespace _TestData
{
    public static class TestExtensions
    {
        public static string ToStr(this IEnumerable<int> ms)
        {
            return ms.Aggregate("", (current, s) => current + (s + ","));
        }
        public static List<int> IndexesOf<T>(this IEnumerable<T> source, T value)
        {
            var indexes = new List<int>();

            int index = 0;
            var comparer = EqualityComparer<T>.Default; // or pass in as a parameter
            foreach (T item in source)
            {
                if (comparer.Equals(item, value))
                {
                    indexes.Add(index);
                };
                index++;
            }
            return indexes;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
#if __debug
            var nab = "4 7 10";
#else
            var nab = Console.ReadLine();
#endif
            var n = Convert.ToInt32(nab.Split(' ')[0]);
            var a = Convert.ToInt32(nab.Split(' ')[1]);
            var b = Convert.ToInt32(nab.Split(' ')[2]);
            Console.WriteLine(Check(n,a,b));
        }

        static int[] get_Plates(int n1, int n2, int a, int b)
        {
            var plates = new int[n1 + n2];
            int a_portion = a / n1;//пофиг на разницу т.к. минимум уже будет, пусть 10 для 3 будет не 3 3 4 а 3 3 3
            int b_portion = b / n2;

            if (a_portion != 0 && b_portion != 0)
            {
                //накладываем на первые тарелки
                for (int i = 0; i < n1; i++)
                {
                    plates[i] = a_portion;
                }
                for (int i = n1; i < (n1 + n2); i++)
                {
                    plates[i] = b_portion;
                }
            }
            return plates;
        }
        static string Check(int n, int a, int b)
        {
            if (a > b)
            {
                var tmp = a;
                a = b;
                b = tmp;
            }

            int max = 0;
            for (int i = 1; i < n; i++)
            {
                var plates = get_Plates(i, n - i, a, b);

                var pMin = plates.Min();

#if __debug
                Console.WriteLine($"по тарелкам i={i} plates={plates.ToStr()} pMin={pMin}");
#endif

                if (pMin < max) break;
                if (pMin > max) max = pMin;
            }

            return max.ToString();
        }
    }
}

using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        int platesCount = inputData[0];
        int firstCakePieces = inputData[1];
        int secondCakePieces = inputData[2];

        int commonPieces = firstCakePieces + secondCakePieces;
        int minPiecesOnPlate = commonPieces / platesCount;

        int findedValue;

        if (commonPieces == platesCount)
        {
            findedValue = 1;
        }
        else if (firstCakePieces < minPiecesOnPlate)
        {
            findedValue = firstCakePieces;
        }
        else if (secondCakePieces < minPiecesOnPlate)
        {
            findedValue = secondCakePieces;
        }
        else
        {
            while (true)
            {
                int minPiecesFromFirstCake = firstCakePieces / minPiecesOnPlate;
                int minPiecesFromSecondCake = secondCakePieces / minPiecesOnPlate;

                if (minPiecesFromFirstCake + minPiecesFromSecondCake >= platesCount)
                {
                    break;
                }
                minPiecesOnPlate--;
            }
            findedValue = minPiecesOnPlate;
        }

        Console.WriteLine(findedValue);
        Console.ReadLine();
    }
}

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

namespace Codeforces
{
    class Program
    {
        static private int Cake(int slices, int plates)
        {
            return slices / plates;
        }

        static private int Compute(int n, int a, int b)
        {
            int result = -1;
            for (int i = 1; i <= n - 1; i++)
            {
                result = Math.Max(Math.Min(a / i, b / (n - i)), result);
            }
            return result;
        }

        static public void Main()
        {
            string s1 = Console.ReadLine();
            while (s1 != null)
            {
                string[] ss = s1.Split(' ');
                int[] arr = ss.Select(t => int.Parse(t)).ToArray();
                int result = Compute(arr[0], arr[1], arr[2]);
                Console.WriteLine(result);
                s1 = Console.ReadLine();
            }
        }
    }
}

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

namespace Codeforces
{
    class Program
    {
        static private int Compute(int n, int a, int b)
        {
            int result = -1;
            for (int i = 1; i <= n - 1; i++)
            {
                result = Math.Max(Math.Min(a / i, b / (n - i)), result);
            }
            return result;
        }

        static public void Main()
        {
            string s1 = Console.ReadLine();
            while (s1 != null)
            {
                string[] ss = s1.Split(' ');
                int[] arr = ss.Select(t => int.Parse(t)).ToArray();
                int result = Compute(arr[0], arr[1], arr[2]);
                Console.WriteLine(result);
                s1 = Console.ReadLine();
            }
        }
    }
}

using System;

namespace CSharp
{
    public class _911B
    {
        public static void Main()
        {
            string[] tokens = Console.ReadLine().Split();

            int n = int.Parse(tokens[0]);
            int a = int.Parse(tokens[1]);
            int b = int.Parse(tokens[2]);

            for (int x = Math.Min(a, b); ; x--)
            {
                if (a / x + b / x >= n)
                {
                    Console.WriteLine(x);
                    return;
                }
            }
        }
    }
}

using System;
using System.Linq;
using CompLib.Util;

public class Program
{

    public void Solve()
    {
        var sc = new Scanner();
        int n = sc.NextInt();
        int a = sc.NextInt();
        int b = sc.NextInt();

        /*
         * n人　n枚皿
         *
         * a個、b個
         */

        int ans = int.MinValue;
        for (int i = 1; i < n; i++)
        {
            int j = n - i;
            int aa = a / i;
            int bb = b / j;
            if (aa <= 0 || bb <= 0) continue;

            ans = Math.Max(ans, Math.Min(aa, bb));
        }

        Console.WriteLine(ans);
    }

    public static void Main(string[] args) => new Program().Solve();
}

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;

namespace example
{
    class Program
    {
        public static void Main(string[] args)
        {
            var line = Console.ReadLine().Split();
            int[] array = line.Select(p => int.Parse(p)).ToArray();
            int n = array[0];
            int a = array[1];
            int b = array[2];
            int x = 0;
            while (Can(n, a, b, x + 1))
                x++;
            Console.WriteLine(x);

        }

        public static bool Can(int n, int a, int b, int x)
        {
            for (int i = 1; i < n; i++)
            {
                int fa = i;
                int fb = n - i;

                if (a / fa >= x && b / fb >= x)
                    return true;
            }

            return false;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using System.Diagnostics;
using System.Numerics;
using static System.Console;
using static System.Convert;
using static System.Math;
using static Template;
using Pi = Pair<int, int>;

class Solver
{
    public void Solve(Scanner sc)
    {
        int n, a, b;
        sc.Make(out n, out a, out b);
        var res = 0;
        for(int i = 1; i < n; i++)
        {
            int c = a / i;
            var d = b / (n-i);
            chmax(ref res, Min(c, d));
        }
        Console.WriteLine(res);
    }
}

#region Template
public static class Template
{
    static void Main(string[] args)
    {
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        new Solver().Solve(new Scanner());
        Console.Out.Flush();
    }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmin<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static bool chmax<T>(ref T a, T b) where T : IComparable<T> { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(ref T a, ref T b) { var t = b; b = a; a = t; }
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public static void swap<T>(this IList<T> A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }
    public static T[] Create<T>(int n, Func<T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }
    public static T[] Create<T>(int n, Func<int, T> f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }
    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> A) => A.OrderBy(v => Guid.NewGuid());
    public static int CompareTo<T>(this T[] A, T[] B, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }
    public static int MaxElement<T>(this IList<T> A, Comparison<T> cmp = null) { cmp = cmp ?? Comparer<T>.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }
    public static T PopBack<T>(this List<T> A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }
    public static void Fail<T>(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }
}
public class Scanner
{
    public string Str => Console.ReadLine().Trim();
    public int Int => int.Parse(Str);
    public long Long => long.Parse(Str);
    public double Double => double.Parse(Str);
    public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();
    public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();
    public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());
    public int[] ArrInt1D(int n) => Create(n, () => Int);
    public long[] ArrLong1D(int n) => Create(n, () => Long);
    public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);
    public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);
    private Queue<string> q = new Queue<string>();
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public T Next<T>() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }
    public void Make<T1>(out T1 v1) => v1 = Next<T1>();
    public void Make<T1, T2>(out T1 v1, out T2 v2) { v1 = Next<T1>(); v2 = Next<T2>(); }
    public void Make<T1, T2, T3>(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next<T3>(); }
    public void Make<T1, T2, T3, T4>(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next<T4>(); }
    public void Make<T1, T2, T3, T4, T5>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next<T5>(); }
    public void Make<T1, T2, T3, T4, T5, T6>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next<T6>(); }
    public void Make<T1, T2, T3, T4, T5, T6, T7>(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6, out T7 v7) { Make(out v1, out v2, out v3, out v4, out v5, out v6); v7 = Next<T7>(); }
    //public (T1, T2) Make<T1, T2>() { Make(out T1 v1, out T2 v2); return (v1, v2); }
    //public (T1, T2, T3) Make<T1, T2, T3>() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }
    //public (T1, T2, T3, T4) Make<T1, T2, T3, T4>() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }
}
public class Pair<T1, T2> : IComparable<Pair<T1, T2>>
{
    public T1 v1;
    public T2 v2;
    public Pair() { }
    public Pair(T1 v1, T2 v2)
    { this.v1 = v1; this.v2 = v2; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2> p)
    {
        var c = Comparer<T1>.Default.Compare(v1, p.v1);
        if (c == 0)
            c = Comparer<T2>.Default.Compare(v2, p.v2);
        return c;
    }
    public override string ToString() => $"{v1.ToString()} {v2.ToString()}";
    public void Deconstruct(out T1 a, out T2 b) { a = v1; b = v2; }
}

public class Pair<T1, T2, T3> : Pair<T1, T2>, IComparable<Pair<T1, T2, T3>>
{
    public T3 v3;
    public Pair() : base() { }
    public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)
    { this.v3 = v3; }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public int CompareTo(Pair<T1, T2, T3> p)
    {
        var c = base.CompareTo(p);
        if (c == 0)
            c = Comparer<T3>.Default.Compare(v3, p.v3);
        return c;
    }
    public override string ToString() => $"{base.ToString()} {v3.ToString()}";
    public void Deconstruct(out T1 a, out T2 b, out T3 c) { Deconstruct(out a, out b); c = v3; }
}
#endregion

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

namespace B
{
    internal class ProblemSolver
    {
        private long _n, _a, _b;

        public void Initialize(long n, long a, long b)
        {
            _n = n;
            _a = a;
            _b = b;
        }

        public long CalculateAndGetAnswer()
        {
            var low = Math.Min(_a, _b);
            var high = Math.Max(_a, _b);

            double x = (double)_n / (_a + _b);
            var lower = (long) Math.Ceiling(x * low);
            if (lower < 1)
            {
                lower = 1;
            }
            var higher = _n - lower;
            var min = Math.Max(Math.Min(_a / higher, _b / lower), Math.Min(_a / lower, _b / higher));

            lower = (long)Math.Floor(x * low);
            if (lower < 1)
            {
                lower = 1;
            }

            higher = _n - lower;
            var min2 = Math.Max(Math.Min(_a / higher, _b / lower), Math.Min(_a / lower, _b / higher));

            return Math.Max(min, min2);
        }
    }

    internal class ConsoleHelper
    {
        private readonly ProblemSolver _solver = new ProblemSolver();
        public string CaseOutput { get; private set; }

        public T LineToValue<T>(string line) where T : struct
        {
            return (T)Convert.ChangeType(line.Split()[0], typeof(T));
        }

        public List<T> LineToList<T>(string line) where T : struct
        {
            return line.Split(' ').Select(x => (T)Convert.ChangeType(x, typeof(T))).ToList();
        }

        public void ReadCaseInput(string caseInput)
        {
            using (var stringReader = new StringReader(caseInput))
            {
                var list = LineToList<long>(stringReader.ReadLine());
                _solver.Initialize(list[0], list[1], list[2]);
            }
        }

        public void CalculateAnswer()
        {
            CaseOutput = _solver.CalculateAndGetAnswer().ToString();
        }
    }

    internal class Program
    {
        private static void Main(string[] args)
        {
            var consoleHelper = new ConsoleHelper();
            long t = 1;
            for (var i = 0; i < t; i++)
            {
                var stringBuilder = new StringBuilder();
                stringBuilder.AppendLine(Console.ReadLine());
                stringBuilder.AppendLine(Console.ReadLine());

                consoleHelper.ReadCaseInput(stringBuilder.ToString());
                consoleHelper.CalculateAnswer();

                Console.WriteLine(consoleHelper.CaseOutput);
            }
        }
    }
}

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

class P
{
    static void Main()
    {
        int[] NAB = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int N = NAB[0];
        int A = NAB[1];
        int B = NAB[2];
        int max = 0;
        for (int i = 1; i < N; i++)
        {
            max = Math.Max(max, Math.Min((A / i), (B / (N - i))));
        }
        Console.WriteLine(max);
    }
}

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

namespace Codeforces
{
   class B
   {
      static void Main(string[] args)
      {
         string[] token = Console.ReadLine().Split();

         int n = int.Parse(token[0]);
         int a = int.Parse(token[1]);
         int b = int.Parse(token[2]);

         int min = Math.Min(a,b);
         int max = Math.Max(a,b);

         int ans = int.MinValue;

         for(int i=1;i<n;i++){
           int A = i;
           int B = n - i;

            ans = Math.Max(ans, Math.Min( (min/A) , (max/B)));

         }

         Console.WriteLine(ans);

      }

   }

}

using System;
using System.Collections;
using System.Collections.Generic;
//using System.Data.Odbc;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Remoting.Proxies;
using System.Security.Cryptography;
using System.Text;
using System.Xml.Schema;
namespace ConsoleApplication {
    class MainClass {
        ////////////////////////////////////////////////////////////////////////////////
        private int N,A,B;
        void Solve() {
            io.i(out N,out A,out B);
            var ans = 0;
            for(int i = 1; i <= N - 1; ++i)
                ans = Math.Max(ans,Math.Min(A / i, B / (N - i)));
            io.o(ans);
        }

        ////////////////////////////////////////////////////////////////////////////////
        public static void Main() => new MainClass().Stream();
        IO io = new IO();
        Mat mat = new Mat();
        void Stream() {
            Solve();
            //Test();
            io.Flush();
        }
        void Test() { }
        void FOR(int a, int b, Action <int> act) {
            for(int i = a; i < b; ++i) act(i);
        }
        void FORR(int a, int b, Action <int> act) {
            for(int i = a - 1; i >= b; --i) act(i);
        }
    }
    #region Default
    class IO {
        #region INPUT
        int _buffCnt;
        string[] _nextBuff;
        private readonly char[] _splitCharacter = new char[] {' '};
        private readonly StreamWriter _sw = new StreamWriter(Console.OpenStandardOutput()) {
            AutoFlush = false
        };
        public IO() {
            _nextBuff = new string[0];
            _buffCnt = 0;
            Console.SetOut(_sw);
        }
        private string Next() {
            if(_buffCnt < _nextBuff.Length) return _nextBuff[_buffCnt++];
            var str = Scan;
            while(str == "") str = Scan;
            _nextBuff = str.Split(_splitCharacter, StringSplitOptions.RemoveEmptyEntries);
            _buffCnt = 0;
            return _nextBuff[_buffCnt++];
        }
        private string Scan => Console.ReadLine();
        private string[] Arr => Scan.Split(' ');
        private void Read <T>(out T v) => v = SuitType <T>(Next());
        private T ConvertType <T, TU>(TU v) => (T)Convert.ChangeType(v, typeof(T));
        private bool TypeEqual <T, TU>() => typeof(T) == typeof(TU);
        private T SuitType <T>(string s)
            =>
                TypeEqual <T, int>()
                    ? ConvertType <T, int>(int.Parse(s))
                    : TypeEqual <T, long>()
                        ? ConvertType <T, long>(long.Parse(s))
                        : TypeEqual <T, double>()
                            ? ConvertType <T, double>(double.Parse(s))
                            : TypeEqual <T, char>() ? ConvertType <T, char>(char.Parse(s)) : ConvertType <T, string>(s);
        public string String => Next();
        public char Char => char.Parse(Next());
        public int Int => int.Parse(Next());
        public long Long => long.Parse(Next());
        public double Double => double.Parse(Next());
        public string[] ArrString => Arr;
        public char[] ArrChar => Array.ConvertAll(Arr, char.Parse);
        public int[] ArrInt => Array.ConvertAll(Arr, int.Parse);
        public long[] ArrLong => Array.ConvertAll(Arr, long.Parse);
        public double[] ArrDouble => Array.ConvertAll(Arr, double.Parse);
        public void Flush() => Console.Out.Flush();
        private T i <T>() { return SuitType <T>(String); }
        public void i <T>(out T v) => Read(out v);
        public void i <T, TU>(out T t, out TU u) {
            i(out t);
            i(out u);
        }
        public void i <T, TU, TV>(out T t, out TU u, out TV v) {
            i(out t, out u);
            i(out v);
        }
        public void i <T, TU, TV, TW>(out T t, out TU u, out TV v, out TW w) {
            i(out t, out u, out v);
            i(out w);
        }
        public void i <T, TU, TV, TW, TX>(out T t, out TU u, out TV v, out TW w, out TX x) {
            i(out t, out u, out v, out w);
            i(out x);
        }
        public void ini <T>(out T[] a, int n) {
            a = new T[n];
            for(int i = 0; i < n; ++i) a[i] = i <T>();
        }
        public void ini <T, TU>(out T[] a, out TU[] b, int n) {
            a = new T[n];
            b = new TU[n];
            for(int i = 0; i < n; ++i) {
                a[i] = i <T>();
                b[i] = i <TU>();
            }
        }
        public void ini <T, TU, TV>(out T[] a, out TU[] b, out TV[] c, int n) {
            a = new T[n];
            b = new TU[n];
            c = new TV[n];
            for(int i = 0; i < n; ++i) {
                a[i] = i <T>();
                b[i] = i <TU>();
                c[i] = i <TV>();
            }
        }
        public void ini <T>(out T[,] a, int h, int w) {
            a = new T[h, w];
            for(int i = 0; i < h; ++i) for(int j = 0; j < w; ++j) a[i, j] = i <T>();
        }
        public void ini <T, TU>(out Tuple <T, TU>[] t, int n) {
            t = new Tuple <T, TU>[n];
            for(int j = 0; j < n; ++j) {
                T i1;
                TU i2;
                i(out i1, out i2);
                t[j] = Tuple.Create(i1, i2);
            }
        }
        public void ini <T, TU, TV>(out Tuple <T, TU, TV>[] t, int n) {
            t = new Tuple <T, TU, TV>[n];
            for(int j = 0; j < n; ++j) {
                T i1;
                TU i2;
                TV i3;
                i(out i1, out i2, out i3);
                t[j] = Tuple.Create(i1, i2, i3);
            }
        }
        #endregion
        #region OUTPUT
        private void Out <T>(T v) => Console.Write(v);
        private void OutLine <T>(T v) => Console.WriteLine(v);
        public void o <T>(T v) => OutLine(v);
        public void o <T>(params T[] a) => Array.ForEach(a, OutLine);
        public void o <T>(T[,] a) {
            int a0 = a.GetLength(0), a1 = a.GetLength(1);
            for(int i = 0; i < a0; ++i) {
                for(int j = 0; j < a1 - 1; ++j) Out(a[i, j] + " ");
                OutLine(a[i, a1 - 1]);
            }
        }
        public void ol <T>(params T[] a) => OutLine(string.Join(" ", a));
        public void YN(bool f) => OutLine(f ? "YES" : "NO");
        public void Yn(bool f) => OutLine(f ? "Yes" : "No");
        public void yn(bool f) => OutLine(f ? "yes" : "no");
        #endregion
    }
    class Mat {
        public long mod = 1000000007; //10^9+7
        public long Pow(long a, long b) {
            if(b == 0) return 1;
            if(b % 2 == 1) return (a % mod * Pow(a % mod, b - 1) % mod) % mod;
            else return Pow(a * a % mod, b / 2) % mod;
        }
        public long Fact(long n) {
            long ret = 1;
            for(long i = 1; i <= n; i++) ret = (ret * i) % mod;
            return ret;
        }
        public long[,] C(int N) {
            long[,] Co = new long[N + 1, N + 1];
            (N + 1).REP(i => (i + 1).REP(j => Co[i, j] = (j == 0 || j == i) ? 1L : Co[i - 1, j - 1] + Co[i - 1, j]));
            return Co;
        }
        public long C(long n, long r) {
            if(r == 0 || n == r) return 1;
            if(n == 0) return 0;
            if(n < 0 || r < 0 || n < r) throw new ArgumentException("n or r invalid");
            else return (Fact(n) % mod * Pow((Fact(n - r) % mod * Fact(r) % mod) % mod, mod - 2) % mod) % mod;
        }
        public long NoModC(long n, long r) {
            var c = new long[r + 1];
            c[0] = 1;
            for(var i = 1; i <= n; ++i) for(var j = Math.Min(i, r); j > 0; j--) c[j] = c[j] + c[j - 1];
            return c[r];
        }
        public long H(long n, long r) => C(n + r - 1, r);
        public long P(long n, long r) => Fact(n) / Fact(n - r);
        public long Lcm(long a, long b) => a * (b / Gcd(a, b));
        public long Lcm(params long[] a) => a.Aggregate((v, n) => Lcm(v, n));
        public long Gcd(long a, long b) {
            if(a < b) Swap(ref a, ref b);
            return b == 0 ? a : Gcd(b, a % b);
        }
        public long Gcd(params long[] array) => array.Aggregate((v, n) => Gcd(v, n));
        public T Max <T>(params T[] a) => a.Max();
        public T Min <T>(params T[] a) => a.Min();
        public void Swap <T>(ref T a, ref T b) {
            T tmp = a;
            a = b;
            b = tmp;
        }
        public double Dis(int x1, int y1, int x2, int y2) => Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2));
        public int ManhattanDis(int x1, int y1, int x2, int y2) => Math.Abs(x1 - x2) + Math.Abs(y1 - y2);
        public int[] DigArr(int n) {
            int[] ret = new int[Digit(n)];
            ret.Length.REP(i => ret[i] = DigVal(n, i + 1));
            return ret;
        }
        public long DigArr2Num(IEnumerable <int> enu) { return enu.Aggregate((v, n) => v * 10 + n); }
        public int Digit(long n) { return (n == 0) ? 1 : (int)Math.Log10(n) + 1; }
        public int DigVal(int n, int dig) { return (n % (int)Pow(10, dig)) / (int)Pow(10, dig - 1); }
        public long Tousa(long a, long d, long n) { return a + (n - 1) * d; }
        public long TousaSum(long a, long d, long n) { return n * (2 * a + (n - 1) * d) / 2; }
        public long[] EnuDivsor(long N) {
            var ret = new SortedSet <long>();
            for(long i = 1; i * i <= N; i++)
                if(N % i == 0) {
                    ret.Add(i);
                    ret.Add(N / i);
                }
            return ret.ToArray();
        }
        public Dictionary <long, long> PrimeFactor(long n) {
            var ret = new Dictionary <long, long>();
            for(int i = 2; i * i <= n; ++i) {
                if(!ret.ContainsKey(i)) ret[i] = 0;
                while(n % i == 0) {
                    ++ret[i];
                    n /= i;
                }
            }
            return ret.Where(kp => kp.Value != 0).ToDictionary(kp => kp.Key, kp => kp.Value);
        }
    }
    public struct Edge : IComparable <Edge> {
        public int To;
        public long Cost;
        public Edge(int to, long cost) {
            To = to;
            Cost = cost;
        }
        public int CompareTo(Edge e) => Cost.CompareTo(e.Cost);
    }
    #endregion
    #region MyEx
    static class StringEX {
        public static string Reversed(this string s) => string.Join("", s.Reverse());
        public static string Repeated(this string s, int n) => string.Concat(Enumerable.Repeat(s, n).ToArray());
        public static string toString(this char[] a) => new string(a);
        public static int toInt(this string s) {
            int n;
            return (int.TryParse(s.TrimStart('0'), out n)) ? n : 0;
        }
        public static int toInt(this char c) => toInt(c.ToString());
        public static int toInt(this char[] c) => toInt(c.toString());
        public static long toLong(this string s) {
            long n;
            return (long.TryParse(s.TrimStart('0'), out n)) ? n : 0L;
        }
        public static long toLong(this char c) => toLong(c.ToString());
        public static long toLong(this char[] c) => toLong(c.toString());
    }
    static class NumericEX {
        public static string toString(this double d) => d.ToString("R", CultureInfo.InvariantCulture);
        public static string Pad0 <T>(this T s, int n) => s.ToString().PadLeft(n, '0');
        public static string RoundOff(this double v, int n)
            => Math.Round(v, n - 1, MidpointRounding.AwayFromZero).toString();
        public static string RoundUp(this double v) => Math.Ceiling(v).toString();
        public static string RoundDown(this double v) => Math.Floor(v).toString();
        public static bool Odd(this int v) => (v & 1) != 0;
        public static bool Odd(this long v) => (v & 1) != 0;
        public static void REP(this int v, Action <int> act) {
            for(int i = 0; i < v; ++i) act(i);
        }
        public static void REPR(this int v, Action <int> act) {
            for(int i = v - 1; i >= 0; --i) act(i);
        }
        public static void EREP(this int v, Action <int> act) => (v + 1).REP(act);
    }
    static class ArrayEX {
        public static T[] Sort <T>(this T[] a) {
            Array.Sort(a);
            return a;
        }
        public static T[] SortR <T>(this T[] a) {
            Array.Reverse(a.Sort());
            return a;
        }
        public static void Set <T>(this T[] a, T v) => a.Length.REP(i => a[i] = v);
        public static void Set <T>(this T[,] a, T v) => a.GetLength(0).REP(i => a.GetLength(1).REP(j => a[i, j] = v));
        public static void Set <T>(this T[,,] a, T v)
            => a.GetLength(0).REP(i => a.GetLength(1).REP(j => a.GetLength(2).REP(k => a[i, j, k] = v)));
        public static int LowerBound <T>(this T[] a, T x) where T : IComparable {
            int lb = -1, ub = a.Length;
            while(ub - lb > 1) {
                int mid = (ub + lb) >> 1;
                if(a[mid].CompareTo(x) >= 0) ub = mid;
                else lb = mid;
            }
            return ub;
        }
        public static int UpperBound <T>(this T[] a, T x) where T : IComparable {
            int lb = -1, ub = a.Length;
            while(ub - lb > 1) {
                int mid = (ub + lb) >> 1;
                if(a[mid].CompareTo(x) > 0) ub = mid;
                else lb = mid;
            }
            return ub;
        }
        public static int Range <T>(this T[] a, T from, T to) where T : IComparable
            => a.UpperBound(to) - a.LowerBound(from);
    }
    #endregion
}

using System;

namespace TypA
{
    class Program
    {
        public static int[] Recieve()
        {
            string s = Console.ReadLine();
            string[] S = s.Split(' ');
            int[] A = new int[S.Length];
            for(int i = 0;i<S.Length;i++)
            {
                A[i] = Convert.ToInt32(S[i]);
            }
            return A;
        }
        public static int mis(int a, int b)
        {
            if (a < b) return a;
            else return b;
        }
        public static int mx(int a, int b)
        {
            if (a < b) return b;
            else return a;
        }
        static void Main(string[] args)
        {
            int[] n = Recieve();
            int k = Convert.ToInt32(n[0]);
            int a = Convert.ToInt32(n[1]);
            int b = Convert.ToInt32(n[2]);
            if (a + b == k) Console.WriteLine(1);
            else
            {
                int ulm = -1;
                for(int i = 1; i < k; i++)
                {
                    if(i>k/2)
                    {
                        int u = mis(a, b) / (k - i);
                        int o = mx(a, b) / i;
                        if (ulm < mis(u, o)) ulm = mis(u, o);
                    }
                    else
                    {
                        int u = mx(a, b) / (k - i);
                        int o = mis(a, b) / i;
                        if (ulm < mis(u, o)) ulm = mis(u, o);
                    }

                }
                Console.WriteLine(ulm);
            }
        }
    }
}

using System;

namespace CF911 {
    class Program {
        static void Main(string[] args) {
            string line = Console.ReadLine();
            string[] tokens = line.Split(' ');

            var plateNumber = int.Parse(tokens[0]);
            var pieceFirst = int.Parse(tokens[1]);
            var pieceSecond = int.Parse(tokens[2]);

            var maxPiece = 0;

            for (int i = 1; i < plateNumber; i++) {
                var compareMin = Math.Min(pieceFirst / i, pieceSecond / (plateNumber - i));
                maxPiece = Math.Max(maxPiece, compareMin);
            }

            Console.WriteLine(maxPiece);
        }
    }
}

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

namespace aaamasodik
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int n = int.Parse(s[0]), a = int.Parse(s[1]), b = int.Parse(s[2]);
            int max = 0;
            for (int i = 1; i < n; i++)
            {
                if (Math.Min(a/i, b/(n-i)) > max)
                {
                    max = Math.Min(a / i, b / (n - i));
                }
            }
            Console.WriteLine(max);
            Console.ReadLine();
        }
    }
}

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

namespace CodeForces
{
    public class CodeForces
    {
        static void Main(string[] args)
        {
            var arr = GetArray();
            var n = arr[0];
            var a = arr[1];
            var b = arr[2];
            Console.WriteLine(Solve(n,a,b));
        }

        public static void Tests()
        {
            //\
        }

        public static long Solve(int n, int a, int b)
        {

            var i = 1;
            var k = n - i;
            var max = 0;
            while ( i <= k)
            {
                var m = Math.Min(a / i, b / k);
                var t = Math.Min(a / k, b / i);
                max = Math.Max(max, m);
                max = Math.Max(max, t);
                i++;
                k = n - i;

            }
            return max;

        }

        static int[] GetArray()
        {
            return Array.ConvertAll(Console.ReadLine().Split(), Convert.ToInt32);
        }

        public static void SieveOfErathostenes(int upperLimit)
        {
            //BitArray works just like a bool[] but takes up a lot less space.
            BitArray composite = new BitArray(upperLimit);

            //Only need to cross off numbers up to sqrt.
            int sqrt = (int)Math.Sqrt(upperLimit);
            for (int p = 2; p <= sqrt; ++p)
            {
                if (composite[p])
                    continue; //The number is crossed off; skip it

                //Cross off each multiple of this prime
                //Start at the prime squared, because lower numbers will
                //have been crossed off already. No need to check them.
                for (int i = p * p; i < upperLimit; i += p)
                    composite[i] = true;
            }
            long cn = 0;
            for (var i = 2; i < upperLimit; i++)
            {
                if (!composite[i])
                    cn++;
            }
            Console.WriteLine(upperLimit + " " + cn);
        }

    }
}

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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;
        static Random rnd = new Random();

        enum Direction { Vertical, Horizontal }

        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            if (File.Exists("input.txt"))
            {
                sr.Close();
                sw.Close();
            }
        }

        static void Solve()
        {
            int n = ReadInt(), a = ReadInt(), b = ReadInt();
            int i = 1;
            int answer = 0;
            while (i <= Math.Min(a, b))
            {
                if (Can(n, a, b, i))
                    answer = i;
                i++;
            }
            sw.WriteLine(answer);
        }

        static bool Can(int n, int a, int b, int x)
        {
            int k = 0;
            while (a >= x)
            {
                a -= x;
                k++;
            }
            while (b >= x)
            {
                b -= x;
                k++;
            }
            return k >= n;
        }

        static int[][] GetReverseMatrix(int[][] a)
        {
            int[][] answer = new int[a[0].Length][];
            for (int i = 0; i < a[0].Length; i++)
            {
                answer[i] = new int[a.Length];
                for (int j = 0; j < a.Length; j++)
                    answer[i][j] = a[j][i];
            }
            return answer;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static double getArithmeticProgressionSum(int n)
        {
            return (n * (n + 1)) / 2;
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static Graph ReadGraph()
        {
            return ReadGraph(ReadInt(), ReadInt());
        }

        static Graph ReadGraph(int n, int m)
        {
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
            }
            return new Graph(n, a, b);
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser)
            where T : IComparable<T>
        {
            return ReadGraph<T>(parser, ReadInt(), ReadInt());
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser, int n, int m)
            where T : IComparable<T>
        {
            int[] a = new int[m];
            int[] b = new int[m];
            T[] c = new T[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
                c[i] = Read<T>(sr, parser);
            }
            return new Graph<T>(n, a, b, c);
        }

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static int[] ReadArrayInt(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static char[][] ReadMatrixChar(int n, int m)
        {
            char[][] answer = new char[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = ReadString().ToCharArray();
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        protected int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public int GetLength()
        {
            return Edges.Length;
        }

        public int GetLength(int n)
        {
            return Edges[n].Length;
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i])
                {
                    temp[a[i] - 1]++;
                    temp[b[i] - 1]++;
                }
                else
                {
                    temp[a[i] - 1]++;
                }
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                    Edges[b[j] - 1][temp[b[j] - 1]++] = a[j] - 1;
                }
                else
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            foreach (var i in Edges)
            {
                foreach (var j in i)
                {
                    answer += (j + 1) + " ";
                }
                answer += Environment.NewLine;
            }
            return answer;
        }
    }

    class Graph<T> : Graph
        where T : IComparable<T>
    {
        public T[][] Cost;

        public T GetCost(int x, int y) => Cost[x][y];

        public void SetCost(T a, int x, int y) => Cost[x][y] = a;

        public Graph(int n, int[] a, int[] b, T[] c) : base(n, a, b)
        {
            this.GenerateEdges(n, a, b, c);
        }

        private void GenerateEdges(int n, int[] a, int[] b, T[] c)
        {
            Cost = new T[n][];
            for (int i = 0; i < n; i++)
            {
                Cost[i] = new T[Edges[i].Length];
            }
            int[] temp = new int[n];

            for (int j = 0; j < c.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                    Cost[b[j] - 1][temp[b[j] - 1]++] = c[j];
                }
                else
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            for (int i = 0; i < Cost.Length; i++)
            {
                for (int j = 0; j < Cost[i].Length; j++)
                {
                    answer += (i + 1) + " " + (Edges[i][j] + 1) + " " + Cost[i][j] + Environment.NewLine;
                }
            }
            return answer;
        }
    }

    class SimplePair<U, V>
    {
        public U first;
        public V second;
        public SimplePair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

    }

    struct Pair<U, V> : IComparable<Pair<U, V>>
        where U : IComparable<U>
        where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }

    class SuperList<T>
    {
        protected LinkedList<T> linkedListMain;
        protected LinkedList<SimplePair<int, LinkedListNode<T>>> linkedListAdditional;
        int step = 0;
        public int resize = 0;

        public SuperList(IEnumerable<T> input)
        {
            Init(input);
        }

        public int Count { get { return linkedListMain.Count; } }

        public T this[int index]
        {
            get
            {
                return GetNode(index).Value;
            }
            set
            {
                GetNode(index).Value = value;
            }
        }

        public void AddValueToIndex(int index, T value)
        {
            if (index > linkedListMain.Count || index < 0)
            {
                throw new IndexOutOfRangeException();
            }
            if (index == linkedListMain.Count)
            {
                linkedListMain.AddLast(value);
                linkedListAdditional.Last.Value.second = linkedListMain.Last;
                linkedListAdditional.Last.Value.first = linkedListMain.Count - 1;
                IncreaseReferenceIndexes(index + 1);
                return;
            }
            if (index == 0)
            {
                linkedListMain.AddFirst(value);
                linkedListAdditional.First.Value.second = linkedListMain.First;
                IncreaseReferenceIndexes(1);
                return;
            }
            linkedListMain.AddBefore(GetNode(index), value);
            IncreaseReferenceIndexes(index);
        }

        private LinkedListNode<T> GetNode(int index)
        {
            var NowNode = linkedListAdditional.First;
            while (NowNode != linkedListAdditional.Last
                && NowNode.Value.first < index)
            {
                NowNode = NowNode.Next;
            }
            var NodeAnswer = NowNode.Value.second;
            int i = NowNode.Value.first;
            while (i > index)
            {
                i--;
                NodeAnswer = NodeAnswer.Previous;
            }
            while (i < index)
            {
                i++;
                NodeAnswer = NodeAnswer.Next;
            }
            return NodeAnswer;
        }

        private void Init(IEnumerable<T> input)
        {
            linkedListMain = new LinkedList<T>();
            foreach (T iter in input)
            {
                linkedListMain.AddLast(iter);
            }
            InitReferences();
        }

        private void InitReferences()
        {
            resize++;
            linkedListAdditional = new LinkedList<SimplePair<int, LinkedListNode<T>>>();
            step = Math.Max(1, (int)Math.Sqrt(linkedListMain.Count));
            int now = step;
            LinkedListNode<T> NowNode = null;
            for (int i = 0; i < linkedListMain.Count; i++)
            {
                if (NowNode == null)
                    NowNode = linkedListMain.First;
                else
                    NowNode = NowNode.Next;
                if (now == step)
                {
                    now = 0;
                    linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>(i, NowNode));
                }
                else
                {
                    now++;
                }
            }
            if (linkedListMain.Last != linkedListAdditional.Last.Value.second)
            {
                linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>
                    (linkedListMain.Count - 1, linkedListMain.Last));
            }
        }

        private void IncreaseReferenceIndexes(int BeginIndex)
        {
            if (linkedListMain.Count == 2)
            {
                InitReferences();
                return;
            }
            LinkedListNode<SimplePair<int, LinkedListNode<T>>> NowNode = null;
            int maxstep = 0;
            for (int i = 0; i < linkedListAdditional.Count; i++)
            {
                if (NowNode == null)
                {
                    NowNode = linkedListAdditional.First;
                }
                else
                {
                    NowNode = NowNode.Next;
                }
                if (NowNode.Value.first >= BeginIndex)
                {
                    NowNode.Value.first++;
                }
                if (NowNode.Previous != null)
                {
                    maxstep = Math.Max(maxstep, NowNode.Value.first - NowNode.Previous.Value.first);
                }
            }
            if (maxstep > step * 2)
            {
                InitReferences();
            }
        }

        public override string ToString()
        {
            return String.Join(" ", linkedListMain);
        }
    }
}

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

namespace Два_торта
{
    class Program
    {
        static void Main(string[] args)
        {
            var S = Console.ReadLine().Split();
            int n = Convert.ToInt32(S[0]);
            int a = Convert.ToInt32(S[1]);
            int b = Convert.ToInt32(S[2]);
            int DLA, DLB;
            int CA, CB;
            int C;
            int T = 0;

            for(int i=1;i<n;i++)
            {
                DLA = i;
                DLB = n - i;

                CA = a / DLA;
                CB = b / DLB;

                C = Math.Min(CA, CB);
                T = Math.Max(T, C);

            }
            Console.WriteLine(T);

        }
    }
}

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

namespace DvaTorta
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int n = int.Parse(s[0]);
            int a = int.Parse(s[1]);
            int b = int.Parse(s[2]);
            int ans = 0;

            for (int i=1;i<n;i++)
            {
                int x = a / i;
                int y = b / (n - i);

                if (x>0 && y>0)
                  ans = Math.Max(ans, Math.Min(x, y));
            }

            Console.Write(ans);

        }
    }
}

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

namespace Two_Cakes
{
    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)
        {
            writer.WriteLine(Solve(args));
            writer.Flush();
        }

        private static int Solve(string[] args)
        {
            int n = Next();
            int a = Next();
            int b = Next();

            for (int i = (a + b)/n; i > 0; i--)
            {
                if (a < i || b < i)
                    continue;
                if (a/i + b/i >= n)
                    return i;
            }

            return 1;
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;

namespace CodeforcesTemplate
{
    public static class Permutation
    {
        private static bool Next(ref int[] arr)
        {
            int k, j, l;
            for (j = arr.Length - 2; (j >= 0) && (arr[j] >= arr[j + 1]); j--) { }
            if (j == -1)
            {
                arr = arr.OrderBy(c => c).ToArray();
                return false;
            }
            for (l = arr.Length - 1; (arr[j] >= arr[l]) && (l >= 0); l--) { }
            var tmp = arr[j];
            arr[j] = arr[l];
            arr[l] = tmp;
            for (k = j + 1, l = arr.Length - 1; k < l; k++, l--)
            {
                tmp = arr[k];
                arr[k] = arr[l];
                arr[l] = tmp;
            }
            return true;
        }
        public static IEnumerable<int[]> AllPermutations(int[] arr)
        {
            do yield return arr;
            while (Next(ref arr));
        }
    }

    class Program
    {
        private const string FILENAME = "distance4";

        private const string INPUT = FILENAME + ".in";

        private const string OUTPUT = FILENAME + ".out";

        private static Stopwatch _stopwatch = new Stopwatch();

        private static StreamReader _reader = null;
        private static StreamWriter _writer = null;

        private static string[] _curLine;
        private static int _curTokenIdx;

        private static char[] _whiteSpaces = new char[] { ' ', '\t', '\r', '\n' };

        private static string ReadNextToken()
        {
            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;
            }

            if (_curTokenIdx >= _curLine.Length)
                return null;

            return _curLine[_curTokenIdx++];
        }

        private static int ReadNextInt()
        {
            return int.Parse(ReadNextToken());
        }

        private static void RunTimer()
        {
#if (DEBUG)

            _stopwatch.Start();

#endif
        }

        private static void Main(string[] args)
        {

#if (DEBUG)
            double before = GC.GetTotalMemory(false);
#endif

            int[] arr = Console.ReadLine().Split().Select(int.Parse).ToArray();

            int n = arr[0];
            int a = arr[1];
            int b = arr[2];

            int cakeA, cakeB, cakeC, cakeCB, cakeCC;

            int answer = 0;

            for (int i = 1; i < n; i++)
            {
                cakeA = i;
                cakeB = n - i;

                cakeC = a / cakeA;
                cakeCB = b / cakeB;

                cakeCC = Math.Min(cakeC, cakeCB);
                answer = Math.Max(answer, cakeCC);

            }
            Console.WriteLine(answer);

#if (DEBUG)
            _stopwatch.Stop();

            double after = GC.GetTotalMemory(false);

            double consumedInMegabytes = (after - before) / (1024 * 1024);

            Console.WriteLine($"Time elapsed: {_stopwatch.Elapsed}");

            Console.WriteLine($"Consumed memory (MB): {consumedInMegabytes}");

            Console.ReadKey();
#endif

        }

        private static int CountLeadZeros(string source)
        {
            int countZero = 0;

            for (int i = source.Length - 1; i >= 0; i--)
            {
                if (source[i] == '0')
                {
                    countZero++;
                }

                else
                {
                    break;
                }

            }

            return countZero;
        }

        private static string ReverseString(string source)
        {
            char[] reverseArray = source.ToCharArray();

            Array.Reverse(reverseArray);

            string reversedString = new string(reverseArray);

            return reversedString;
        }

        private static int[] CopyOfRange(int[] src, int start, int end)
        {
            int len = end - start;
            int[] dest = new int[len];
            Array.Copy(src, start, dest, 0, len);
            return dest;
        }

        private static string StreamReader()
        {

            if (_reader == null)
                _reader = new StreamReader(INPUT);
            string response = _reader.ReadLine();
            if (_reader.EndOfStream)
                _reader.Close();
            return response;

        }

        private static void StreamWriter(string text)
        {

            if (_writer == null)
                _writer = new StreamWriter(OUTPUT);
            _writer.WriteLine(text);

        }

        private static int BFS(int start, int end, int[,] arr)
        {
            Queue<KeyValuePair<int, int>> queue = new Queue<KeyValuePair<int, int>>();
            List<bool> visited = new List<bool>();
            for (int i = 0; i < arr.GetLength(0); i++)
            {
                visited.Add(false);
            }

            queue.Enqueue(new KeyValuePair<int, int>(start, 0));
            KeyValuePair<int, int> node;
            int level = 0;
            bool flag = false;

            while (queue.Count != 0)
            {
                node = queue.Dequeue();
                if (node.Key == end)
                {
                    return node.Value;
                }
                flag = false;
                for (int i = 0; i < arr.GetLength(0); i++)
                {

                    if (arr[node.Key, i] == 1)
                    {
                        if (visited[i] == false)
                        {
                            if (!flag)
                            {
                                level = node.Value + 1;
                                flag = true;
                            }
                            queue.Enqueue(new KeyValuePair<int, int>(i, level));
                            visited[i] = true;
                        }
                    }
                }

            }
            return 0;

        }

        private static void Write(string source)
        {
            File.WriteAllText(OUTPUT, source);
        }

        private static string ReadString()
        {
            return File.ReadAllText(INPUT);
        }

        private static void WriteStringArray(string[] source)
        {
            File.WriteAllLines(OUTPUT, source);
        }

        private static string[] ReadStringArray()
        {
            return File.ReadAllLines(INPUT);
        }

        private static int[] GetIntArray()
        {
            return ReadString().Split(' ').Select(int.Parse).ToArray();
        }

        private static double[] GetDoubleArray()
        {
            return ReadString().Split(' ').Select(double.Parse).ToArray();
        }

        private static int[,] ReadINT2XArray(List<string> lines)
        {
            int[,] arr = new int[lines.Count, lines.Count];

            for (int i = 0; i < lines.Count; i++)
            {
                int[] row = lines[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

                for (int j = 0; j < lines.Count; j++)
                {
                    arr[i, j] = row[j];
                }
            }

            return arr;
        }
    }
}

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

namespace Problem911B
{
    class Program
    {
        static void Main(string[] args)
        {
            var pars = Console.ReadLine().Split(' ').Select(_ => int.Parse(_)).ToArray();
            int n = pars[0], a = pars[1], b = pars[2];
            for (int i = 400; i >= 0; i--)
            {
                if (a / i > 0 && b / i > 0 && a / i + b / i >= n)
                {
                    Console.WriteLine(i);
                    return;
                }
            }
        }
    }
}

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

namespace ConsoleApp12
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputs = (Console.ReadLine().Split().Select(x => int.Parse(x))).ToList();
            for (int i = Math.Min(inputs[1],inputs[2]); i > 0; --i)
            {
                if (inputs[1] / i + inputs[2] / i >= inputs[0])
                {
                    Console.WriteLine(i);
                    break;
                }
            }
        }
    }
}

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

namespace Codeforces.NET
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            string[] parts = line.Split(' ').ToArray();
            int n = int.Parse(parts[0]);
            int a = int.Parse(parts[1]);
            int b = int.Parse(parts[2]);
            int minim = Math.Min(a, b);
            for (int i = minim; i>=1; i--)
            {
                if (a/i + b/i >=n)
                {
                    Console.WriteLine(i);
                    Console.ReadLine();
                    return;
                }
            }
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using System.IO;
public class CodeForces
{
#if TEST
    // To set this go to Project -> Properties -> Build -> General -> Conditional compilation symbols: -> enter 'TEST' into text box.
    const bool testing = true;
#else
const bool testing = false;
#endif

    static void program(TextReader input)
    {
        //var n = int.Parse(input.ReadLine());
        var data = input.ReadLine().Split(' ').Select(int.Parse).ToList();
        var n = data[0];
        var a = data[1];
        var b = data[2];

        var max = 0;
        for(var i = 1; i < n; i++)
        {
            var first = i;
            var second = n - i;

            var minPos = int.MaxValue;

            if(first > a || second > b)
            {
                continue;
            }
                minPos = Math.Min(minPos, a / first);

                minPos = Math.Min(minPos, b / second);

            max = Math.Max(max, minPos);
        }
        Console.WriteLine(max);
    }

    public static void Main(string[] args)
    {
        if (!testing)
        { // set testing to false when submiting to codeforces
            program(Console.In); // write your program in 'program' function (its your new main !)
            return;
        }

        Console.WriteLine("Test Case(1) => expected :");
        Console.WriteLine("1\n");
        Console.WriteLine("Test Case(1) => found    :");
        program(new StringReader("5 2 3\n"));
        Console.WriteLine();

        Console.WriteLine("Test Case(2) => expected :");
        Console.WriteLine("3\n");
        Console.WriteLine("Test Case(2) => found    :");
        program(new StringReader("4 7 10\n"));
        Console.WriteLine();

    }
}

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

namespace B
{
    internal class ProblemSolver
    {
        private long _n, _a, _b;

        public void Initialize(long n, long a, long b)
        {
            _n = n;
            _a = a;
            _b = b;
        }

        public long CalculateAndGetAnswer()
        {
            var low = Math.Min(_a, _b);
            var high = Math.Max(_a, _b);

            double x = (double)_n / (low + high);
            low = (long) Math.Floor(x * low);
            if (low < 1)
            {
                low = 1;
            }
            high = _n - low;

            var min = Math.Max(Math.Min(_a / high, _b / low), Math.Min(_a / low, _b / high));

            return min;
        }
    }

    internal class ConsoleHelper
    {
        private readonly ProblemSolver _solver = new ProblemSolver();
        public string CaseOutput { get; private set; }

        public T LineToValue<T>(string line) where T : struct
        {
            return (T)Convert.ChangeType(line.Split()[0], typeof(T));
        }

        public List<T> LineToList<T>(string line) where T : struct
        {
            return line.Split(' ').Select(x => (T)Convert.ChangeType(x, typeof(T))).ToList();
        }

        public void ReadCaseInput(string caseInput)
        {
            using (var stringReader = new StringReader(caseInput))
            {
                var list = LineToList<long>(stringReader.ReadLine());
                _solver.Initialize(list[0], list[1], list[2]);
            }
        }

        public void CalculateAnswer()
        {
            CaseOutput = _solver.CalculateAndGetAnswer().ToString();
        }
    }

    internal class Program
    {
        private static void Main(string[] args)
        {
            var consoleHelper = new ConsoleHelper();
            long t = 1;
            for (var i = 0; i < t; i++)
            {
                var stringBuilder = new StringBuilder();
                stringBuilder.AppendLine(Console.ReadLine());
                stringBuilder.AppendLine(Console.ReadLine());

                consoleHelper.ReadCaseInput(stringBuilder.ToString());
                consoleHelper.CalculateAnswer();

                Console.WriteLine(consoleHelper.CaseOutput);
            }
        }
    }
}

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

namespace B
{
    internal class ProblemSolver
    {
        private long _n, _a, _b;

        public void Initialize(long n, long a, long b)
        {
            _n = n;
            _a = a;
            _b = b;
        }

        public long CalculateAndGetAnswer()
        {
            var low = Math.Min(_a, _b);
            var high = Math.Max(_a, _b);

            double x = (double)_n / (low + high);
            low = (long) Math.Round(x * low);
            if (low < 1)
            {
                low = 1;
            }
            high = _n - low;

            var min = Math.Max(Math.Min(_a / high, _b / low), Math.Min(_a / low, _b / high));

            return min;
        }
    }

    internal class ConsoleHelper
    {
        private readonly ProblemSolver _solver = new ProblemSolver();
        public string CaseOutput { get; private set; }

        public T LineToValue<T>(string line) where T : struct
        {
            return (T)Convert.ChangeType(line.Split()[0], typeof(T));
        }

        public List<T> LineToList<T>(string line) where T : struct
        {
            return line.Split(' ').Select(x => (T)Convert.ChangeType(x, typeof(T))).ToList();
        }

        public void ReadCaseInput(string caseInput)
        {
            using (var stringReader = new StringReader(caseInput))
            {
                var list = LineToList<long>(stringReader.ReadLine());
                _solver.Initialize(list[0], list[1], list[2]);
            }
        }

        public void CalculateAnswer()
        {
            CaseOutput = _solver.CalculateAndGetAnswer().ToString();
        }
    }

    internal class Program
    {
        private static void Main(string[] args)
        {
            var consoleHelper = new ConsoleHelper();
            long t = 1;
            for (var i = 0; i < t; i++)
            {
                var stringBuilder = new StringBuilder();
                stringBuilder.AppendLine(Console.ReadLine());
                stringBuilder.AppendLine(Console.ReadLine());

                consoleHelper.ReadCaseInput(stringBuilder.ToString());
                consoleHelper.CalculateAnswer();

                Console.WriteLine(consoleHelper.CaseOutput);
            }
        }
    }
}

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

namespace B
{
    internal class ProblemSolver
    {
        private long _n, _a, _b;

        public void Initialize(long n, long a, long b)
        {
            _n = n;
            _a = a;
            _b = b;
        }

        public long CalculateAndGetAnswer()
        {
            var nA = _n / 2;
            var nB = _n - nA;

            var min = Math.Max(Math.Min(_a / nA, _b / nB), Math.Min(_a / nB, _b / nA));

            return min;
        }
    }

    internal class ConsoleHelper
    {
        private readonly ProblemSolver _solver = new ProblemSolver();
        public string CaseOutput { get; private set; }

        public T LineToValue<T>(string line) where T : struct
        {
            return (T)Convert.ChangeType(line.Split()[0], typeof(T));
        }

        public List<T> LineToList<T>(string line) where T : struct
        {
            return line.Split(' ').Select(x => (T)Convert.ChangeType(x, typeof(T))).ToList();
        }

        public void ReadCaseInput(string caseInput)
        {
            using (var stringReader = new StringReader(caseInput))
            {
                var list = LineToList<long>(stringReader.ReadLine());
                _solver.Initialize(list[0], list[1], list[2]);
            }
        }

        public void CalculateAnswer()
        {
            CaseOutput = _solver.CalculateAndGetAnswer().ToString();
        }
    }

    internal class Program
    {
        private static void Main(string[] args)
        {
            var consoleHelper = new ConsoleHelper();
            long t = 1;
            for (var i = 0; i < t; i++)
            {
                var stringBuilder = new StringBuilder();
                stringBuilder.AppendLine(Console.ReadLine());
                stringBuilder.AppendLine(Console.ReadLine());

                consoleHelper.ReadCaseInput(stringBuilder.ToString());
                consoleHelper.CalculateAnswer();

                Console.WriteLine(consoleHelper.CaseOutput);
            }
        }
    }
}

using System;

namespace CF911 {
    class Program {
        static void Main(string[] args) {
            string line = Console.ReadLine();
            string[] tokens = line.Split(' ');
            int[] numbers = Array.ConvertAll(tokens, int.Parse);

            var plateNumber = numbers[0];
            var pieceFirst = numbers[1];
            var pieceSecond = numbers[2];

            int averagePlate = plateNumber / 2;
            int minFirst = pieceFirst / averagePlate;
            int minSecond = pieceSecond / averagePlate;

            Console.WriteLine(minFirst < minSecond ? minFirst : minSecond);
        }
    }
}

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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;
        static Random rnd = new Random();

        enum Direction { Vertical, Horizontal }

        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            if (File.Exists("input.txt"))
            {
                sr.Close();
                sw.Close();
            }
        }

        static void Solve()
        {
            int n = ReadInt(), a = ReadInt(), b = ReadInt();
            int i = 1;
            int answer = 1;
            while (i < 10000)
            {
                if (Can(n, a, b, i))
                    answer = i;
                i++;
            }
            sw.WriteLine(answer);
        }

        static bool Can(int n, int a, int b, int x)
        {
            int k = 0;
            while (a >= x)
            {
                a -= x;
                k++;
            }
            while (b >= x)
            {
                b -= x;
                k++;
            }
            return k >= n;
        }

        static int[][] GetReverseMatrix(int[][] a)
        {
            int[][] answer = new int[a[0].Length][];
            for (int i = 0; i < a[0].Length; i++)
            {
                answer[i] = new int[a.Length];
                for (int j = 0; j < a.Length; j++)
                    answer[i][j] = a[j][i];
            }
            return answer;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static double getArithmeticProgressionSum(int n)
        {
            return (n * (n + 1)) / 2;
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static Graph ReadGraph()
        {
            return ReadGraph(ReadInt(), ReadInt());
        }

        static Graph ReadGraph(int n, int m)
        {
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
            }
            return new Graph(n, a, b);
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser)
            where T : IComparable<T>
        {
            return ReadGraph<T>(parser, ReadInt(), ReadInt());
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser, int n, int m)
            where T : IComparable<T>
        {
            int[] a = new int[m];
            int[] b = new int[m];
            T[] c = new T[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
                c[i] = Read<T>(sr, parser);
            }
            return new Graph<T>(n, a, b, c);
        }

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static int[] ReadArrayInt(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static char[][] ReadMatrixChar(int n, int m)
        {
            char[][] answer = new char[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = ReadString().ToCharArray();
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        protected int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public int GetLength()
        {
            return Edges.Length;
        }

        public int GetLength(int n)
        {
            return Edges[n].Length;
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i])
                {
                    temp[a[i] - 1]++;
                    temp[b[i] - 1]++;
                }
                else
                {
                    temp[a[i] - 1]++;
                }
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                    Edges[b[j] - 1][temp[b[j] - 1]++] = a[j] - 1;
                }
                else
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            foreach (var i in Edges)
            {
                foreach (var j in i)
                {
                    answer += (j + 1) + " ";
                }
                answer += Environment.NewLine;
            }
            return answer;
        }
    }

    class Graph<T> : Graph
        where T : IComparable<T>
    {
        public T[][] Cost;

        public T GetCost(int x, int y) => Cost[x][y];

        public void SetCost(T a, int x, int y) => Cost[x][y] = a;

        public Graph(int n, int[] a, int[] b, T[] c) : base(n, a, b)
        {
            this.GenerateEdges(n, a, b, c);
        }

        private void GenerateEdges(int n, int[] a, int[] b, T[] c)
        {
            Cost = new T[n][];
            for (int i = 0; i < n; i++)
            {
                Cost[i] = new T[Edges[i].Length];
            }
            int[] temp = new int[n];

            for (int j = 0; j < c.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                    Cost[b[j] - 1][temp[b[j] - 1]++] = c[j];
                }
                else
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            for (int i = 0; i < Cost.Length; i++)
            {
                for (int j = 0; j < Cost[i].Length; j++)
                {
                    answer += (i + 1) + " " + (Edges[i][j] + 1) + " " + Cost[i][j] + Environment.NewLine;
                }
            }
            return answer;
        }
    }

    class SimplePair<U, V>
    {
        public U first;
        public V second;
        public SimplePair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

    }

    struct Pair<U, V> : IComparable<Pair<U, V>>
        where U : IComparable<U>
        where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }

    class SuperList<T>
    {
        protected LinkedList<T> linkedListMain;
        protected LinkedList<SimplePair<int, LinkedListNode<T>>> linkedListAdditional;
        int step = 0;
        public int resize = 0;

        public SuperList(IEnumerable<T> input)
        {
            Init(input);
        }

        public int Count { get { return linkedListMain.Count; } }

        public T this[int index]
        {
            get
            {
                return GetNode(index).Value;
            }
            set
            {
                GetNode(index).Value = value;
            }
        }

        public void AddValueToIndex(int index, T value)
        {
            if (index > linkedListMain.Count || index < 0)
            {
                throw new IndexOutOfRangeException();
            }
            if (index == linkedListMain.Count)
            {
                linkedListMain.AddLast(value);
                linkedListAdditional.Last.Value.second = linkedListMain.Last;
                linkedListAdditional.Last.Value.first = linkedListMain.Count - 1;
                IncreaseReferenceIndexes(index + 1);
                return;
            }
            if (index == 0)
            {
                linkedListMain.AddFirst(value);
                linkedListAdditional.First.Value.second = linkedListMain.First;
                IncreaseReferenceIndexes(1);
                return;
            }
            linkedListMain.AddBefore(GetNode(index), value);
            IncreaseReferenceIndexes(index);
        }

        private LinkedListNode<T> GetNode(int index)
        {
            var NowNode = linkedListAdditional.First;
            while (NowNode != linkedListAdditional.Last
                && NowNode.Value.first < index)
            {
                NowNode = NowNode.Next;
            }
            var NodeAnswer = NowNode.Value.second;
            int i = NowNode.Value.first;
            while (i > index)
            {
                i--;
                NodeAnswer = NodeAnswer.Previous;
            }
            while (i < index)
            {
                i++;
                NodeAnswer = NodeAnswer.Next;
            }
            return NodeAnswer;
        }

        private void Init(IEnumerable<T> input)
        {
            linkedListMain = new LinkedList<T>();
            foreach (T iter in input)
            {
                linkedListMain.AddLast(iter);
            }
            InitReferences();
        }

        private void InitReferences()
        {
            resize++;
            linkedListAdditional = new LinkedList<SimplePair<int, LinkedListNode<T>>>();
            step = Math.Max(1, (int)Math.Sqrt(linkedListMain.Count));
            int now = step;
            LinkedListNode<T> NowNode = null;
            for (int i = 0; i < linkedListMain.Count; i++)
            {
                if (NowNode == null)
                    NowNode = linkedListMain.First;
                else
                    NowNode = NowNode.Next;
                if (now == step)
                {
                    now = 0;
                    linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>(i, NowNode));
                }
                else
                {
                    now++;
                }
            }
            if (linkedListMain.Last != linkedListAdditional.Last.Value.second)
            {
                linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>
                    (linkedListMain.Count - 1, linkedListMain.Last));
            }
        }

        private void IncreaseReferenceIndexes(int BeginIndex)
        {
            if (linkedListMain.Count == 2)
            {
                InitReferences();
                return;
            }
            LinkedListNode<SimplePair<int, LinkedListNode<T>>> NowNode = null;
            int maxstep = 0;
            for (int i = 0; i < linkedListAdditional.Count; i++)
            {
                if (NowNode == null)
                {
                    NowNode = linkedListAdditional.First;
                }
                else
                {
                    NowNode = NowNode.Next;
                }
                if (NowNode.Value.first >= BeginIndex)
                {
                    NowNode.Value.first++;
                }
                if (NowNode.Previous != null)
                {
                    maxstep = Math.Max(maxstep, NowNode.Value.first - NowNode.Previous.Value.first);
                }
            }
            if (maxstep > step * 2)
            {
                InitReferences();
            }
        }

        public override string ToString()
        {
            return String.Join(" ", linkedListMain);
        }
    }
}

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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;
        static Random rnd = new Random();

        enum Direction { Vertical, Horizontal }

        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            if (File.Exists("input.txt"))
            {
                sr.Close();
                sw.Close();
            }
        }

        static void Solve()
        {
            int n = ReadInt(), a = ReadInt(), b = ReadInt();
            int i = 1;
            int answer = 1;
            while (i < 10000)
            {
                if (Can(n, a, b, i))
                    answer = i;
                i++;
            }
            sw.WriteLine(answer);
        }

        static bool Can(int n, int a, int b, int x)
        {
            return n <= (a / x) + (b / x);
        }

        static int[][] GetReverseMatrix(int[][] a)
        {
            int[][] answer = new int[a[0].Length][];
            for (int i = 0; i < a[0].Length; i++)
            {
                answer[i] = new int[a.Length];
                for (int j = 0; j < a.Length; j++)
                    answer[i][j] = a[j][i];
            }
            return answer;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static double getArithmeticProgressionSum(int n)
        {
            return (n * (n + 1)) / 2;
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static Graph ReadGraph()
        {
            return ReadGraph(ReadInt(), ReadInt());
        }

        static Graph ReadGraph(int n, int m)
        {
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
            }
            return new Graph(n, a, b);
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser)
            where T : IComparable<T>
        {
            return ReadGraph<T>(parser, ReadInt(), ReadInt());
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser, int n, int m)
            where T : IComparable<T>
        {
            int[] a = new int[m];
            int[] b = new int[m];
            T[] c = new T[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
                c[i] = Read<T>(sr, parser);
            }
            return new Graph<T>(n, a, b, c);
        }

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static int[] ReadArrayInt(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static char[][] ReadMatrixChar(int n, int m)
        {
            char[][] answer = new char[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = ReadString().ToCharArray();
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        protected int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public int GetLength()
        {
            return Edges.Length;
        }

        public int GetLength(int n)
        {
            return Edges[n].Length;
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i])
                {
                    temp[a[i] - 1]++;
                    temp[b[i] - 1]++;
                }
                else
                {
                    temp[a[i] - 1]++;
                }
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                    Edges[b[j] - 1][temp[b[j] - 1]++] = a[j] - 1;
                }
                else
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            foreach (var i in Edges)
            {
                foreach (var j in i)
                {
                    answer += (j + 1) + " ";
                }
                answer += Environment.NewLine;
            }
            return answer;
        }
    }

    class Graph<T> : Graph
        where T : IComparable<T>
    {
        public T[][] Cost;

        public T GetCost(int x, int y) => Cost[x][y];

        public void SetCost(T a, int x, int y) => Cost[x][y] = a;

        public Graph(int n, int[] a, int[] b, T[] c) : base(n, a, b)
        {
            this.GenerateEdges(n, a, b, c);
        }

        private void GenerateEdges(int n, int[] a, int[] b, T[] c)
        {
            Cost = new T[n][];
            for (int i = 0; i < n; i++)
            {
                Cost[i] = new T[Edges[i].Length];
            }
            int[] temp = new int[n];

            for (int j = 0; j < c.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                    Cost[b[j] - 1][temp[b[j] - 1]++] = c[j];
                }
                else
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            for (int i = 0; i < Cost.Length; i++)
            {
                for (int j = 0; j < Cost[i].Length; j++)
                {
                    answer += (i + 1) + " " + (Edges[i][j] + 1) + " " + Cost[i][j] + Environment.NewLine;
                }
            }
            return answer;
        }
    }

    class SimplePair<U, V>
    {
        public U first;
        public V second;
        public SimplePair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

    }

    struct Pair<U, V> : IComparable<Pair<U, V>>
        where U : IComparable<U>
        where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }

    class SuperList<T>
    {
        protected LinkedList<T> linkedListMain;
        protected LinkedList<SimplePair<int, LinkedListNode<T>>> linkedListAdditional;
        int step = 0;
        public int resize = 0;

        public SuperList(IEnumerable<T> input)
        {
            Init(input);
        }

        public int Count { get { return linkedListMain.Count; } }

        public T this[int index]
        {
            get
            {
                return GetNode(index).Value;
            }
            set
            {
                GetNode(index).Value = value;
            }
        }

        public void AddValueToIndex(int index, T value)
        {
            if (index > linkedListMain.Count || index < 0)
            {
                throw new IndexOutOfRangeException();
            }
            if (index == linkedListMain.Count)
            {
                linkedListMain.AddLast(value);
                linkedListAdditional.Last.Value.second = linkedListMain.Last;
                linkedListAdditional.Last.Value.first = linkedListMain.Count - 1;
                IncreaseReferenceIndexes(index + 1);
                return;
            }
            if (index == 0)
            {
                linkedListMain.AddFirst(value);
                linkedListAdditional.First.Value.second = linkedListMain.First;
                IncreaseReferenceIndexes(1);
                return;
            }
            linkedListMain.AddBefore(GetNode(index), value);
            IncreaseReferenceIndexes(index);
        }

        private LinkedListNode<T> GetNode(int index)
        {
            var NowNode = linkedListAdditional.First;
            while (NowNode != linkedListAdditional.Last
                && NowNode.Value.first < index)
            {
                NowNode = NowNode.Next;
            }
            var NodeAnswer = NowNode.Value.second;
            int i = NowNode.Value.first;
            while (i > index)
            {
                i--;
                NodeAnswer = NodeAnswer.Previous;
            }
            while (i < index)
            {
                i++;
                NodeAnswer = NodeAnswer.Next;
            }
            return NodeAnswer;
        }

        private void Init(IEnumerable<T> input)
        {
            linkedListMain = new LinkedList<T>();
            foreach (T iter in input)
            {
                linkedListMain.AddLast(iter);
            }
            InitReferences();
        }

        private void InitReferences()
        {
            resize++;
            linkedListAdditional = new LinkedList<SimplePair<int, LinkedListNode<T>>>();
            step = Math.Max(1, (int)Math.Sqrt(linkedListMain.Count));
            int now = step;
            LinkedListNode<T> NowNode = null;
            for (int i = 0; i < linkedListMain.Count; i++)
            {
                if (NowNode == null)
                    NowNode = linkedListMain.First;
                else
                    NowNode = NowNode.Next;
                if (now == step)
                {
                    now = 0;
                    linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>(i, NowNode));
                }
                else
                {
                    now++;
                }
            }
            if (linkedListMain.Last != linkedListAdditional.Last.Value.second)
            {
                linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>
                    (linkedListMain.Count - 1, linkedListMain.Last));
            }
        }

        private void IncreaseReferenceIndexes(int BeginIndex)
        {
            if (linkedListMain.Count == 2)
            {
                InitReferences();
                return;
            }
            LinkedListNode<SimplePair<int, LinkedListNode<T>>> NowNode = null;
            int maxstep = 0;
            for (int i = 0; i < linkedListAdditional.Count; i++)
            {
                if (NowNode == null)
                {
                    NowNode = linkedListAdditional.First;
                }
                else
                {
                    NowNode = NowNode.Next;
                }
                if (NowNode.Value.first >= BeginIndex)
                {
                    NowNode.Value.first++;
                }
                if (NowNode.Previous != null)
                {
                    maxstep = Math.Max(maxstep, NowNode.Value.first - NowNode.Previous.Value.first);
                }
            }
            if (maxstep > step * 2)
            {
                InitReferences();
            }
        }

        public override string ToString()
        {
            return String.Join(" ", linkedListMain);
        }
    }
}

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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;
        static Random rnd = new Random();

        enum Direction { Vertical, Horizontal }

        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            if (File.Exists("input.txt"))
            {
                sr.Close();
                sw.Close();
            }
        }

        static void Solve()
        {
            int n = ReadInt(), a = ReadInt(), b = ReadInt();
            int i = 1;
            int answer = 0;
            while (i < Math.Min(a, b))
            {
                if (Can(n, a, b, i))
                    answer = i;
                i++;
            }
            sw.WriteLine(answer);
        }

        static bool Can(int n, int a, int b, int x)
        {
            int k = 0;
            while (a >= x)
            {
                a -= x;
                k++;
            }
            while (b >= x)
            {
                b -= x;
                k++;
            }
            return k >= n;
        }

        static int[][] GetReverseMatrix(int[][] a)
        {
            int[][] answer = new int[a[0].Length][];
            for (int i = 0; i < a[0].Length; i++)
            {
                answer[i] = new int[a.Length];
                for (int j = 0; j < a.Length; j++)
                    answer[i][j] = a[j][i];
            }
            return answer;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static double getArithmeticProgressionSum(int n)
        {
            return (n * (n + 1)) / 2;
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static Graph ReadGraph()
        {
            return ReadGraph(ReadInt(), ReadInt());
        }

        static Graph ReadGraph(int n, int m)
        {
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
            }
            return new Graph(n, a, b);
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser)
            where T : IComparable<T>
        {
            return ReadGraph<T>(parser, ReadInt(), ReadInt());
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser, int n, int m)
            where T : IComparable<T>
        {
            int[] a = new int[m];
            int[] b = new int[m];
            T[] c = new T[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
                c[i] = Read<T>(sr, parser);
            }
            return new Graph<T>(n, a, b, c);
        }

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static int[] ReadArrayInt(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static char[][] ReadMatrixChar(int n, int m)
        {
            char[][] answer = new char[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = ReadString().ToCharArray();
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        protected int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public int GetLength()
        {
            return Edges.Length;
        }

        public int GetLength(int n)
        {
            return Edges[n].Length;
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i])
                {
                    temp[a[i] - 1]++;
                    temp[b[i] - 1]++;
                }
                else
                {
                    temp[a[i] - 1]++;
                }
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                    Edges[b[j] - 1][temp[b[j] - 1]++] = a[j] - 1;
                }
                else
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            foreach (var i in Edges)
            {
                foreach (var j in i)
                {
                    answer += (j + 1) + " ";
                }
                answer += Environment.NewLine;
            }
            return answer;
        }
    }

    class Graph<T> : Graph
        where T : IComparable<T>
    {
        public T[][] Cost;

        public T GetCost(int x, int y) => Cost[x][y];

        public void SetCost(T a, int x, int y) => Cost[x][y] = a;

        public Graph(int n, int[] a, int[] b, T[] c) : base(n, a, b)
        {
            this.GenerateEdges(n, a, b, c);
        }

        private void GenerateEdges(int n, int[] a, int[] b, T[] c)
        {
            Cost = new T[n][];
            for (int i = 0; i < n; i++)
            {
                Cost[i] = new T[Edges[i].Length];
            }
            int[] temp = new int[n];

            for (int j = 0; j < c.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                    Cost[b[j] - 1][temp[b[j] - 1]++] = c[j];
                }
                else
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            for (int i = 0; i < Cost.Length; i++)
            {
                for (int j = 0; j < Cost[i].Length; j++)
                {
                    answer += (i + 1) + " " + (Edges[i][j] + 1) + " " + Cost[i][j] + Environment.NewLine;
                }
            }
            return answer;
        }
    }

    class SimplePair<U, V>
    {
        public U first;
        public V second;
        public SimplePair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

    }

    struct Pair<U, V> : IComparable<Pair<U, V>>
        where U : IComparable<U>
        where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }

    class SuperList<T>
    {
        protected LinkedList<T> linkedListMain;
        protected LinkedList<SimplePair<int, LinkedListNode<T>>> linkedListAdditional;
        int step = 0;
        public int resize = 0;

        public SuperList(IEnumerable<T> input)
        {
            Init(input);
        }

        public int Count { get { return linkedListMain.Count; } }

        public T this[int index]
        {
            get
            {
                return GetNode(index).Value;
            }
            set
            {
                GetNode(index).Value = value;
            }
        }

        public void AddValueToIndex(int index, T value)
        {
            if (index > linkedListMain.Count || index < 0)
            {
                throw new IndexOutOfRangeException();
            }
            if (index == linkedListMain.Count)
            {
                linkedListMain.AddLast(value);
                linkedListAdditional.Last.Value.second = linkedListMain.Last;
                linkedListAdditional.Last.Value.first = linkedListMain.Count - 1;
                IncreaseReferenceIndexes(index + 1);
                return;
            }
            if (index == 0)
            {
                linkedListMain.AddFirst(value);
                linkedListAdditional.First.Value.second = linkedListMain.First;
                IncreaseReferenceIndexes(1);
                return;
            }
            linkedListMain.AddBefore(GetNode(index), value);
            IncreaseReferenceIndexes(index);
        }

        private LinkedListNode<T> GetNode(int index)
        {
            var NowNode = linkedListAdditional.First;
            while (NowNode != linkedListAdditional.Last
                && NowNode.Value.first < index)
            {
                NowNode = NowNode.Next;
            }
            var NodeAnswer = NowNode.Value.second;
            int i = NowNode.Value.first;
            while (i > index)
            {
                i--;
                NodeAnswer = NodeAnswer.Previous;
            }
            while (i < index)
            {
                i++;
                NodeAnswer = NodeAnswer.Next;
            }
            return NodeAnswer;
        }

        private void Init(IEnumerable<T> input)
        {
            linkedListMain = new LinkedList<T>();
            foreach (T iter in input)
            {
                linkedListMain.AddLast(iter);
            }
            InitReferences();
        }

        private void InitReferences()
        {
            resize++;
            linkedListAdditional = new LinkedList<SimplePair<int, LinkedListNode<T>>>();
            step = Math.Max(1, (int)Math.Sqrt(linkedListMain.Count));
            int now = step;
            LinkedListNode<T> NowNode = null;
            for (int i = 0; i < linkedListMain.Count; i++)
            {
                if (NowNode == null)
                    NowNode = linkedListMain.First;
                else
                    NowNode = NowNode.Next;
                if (now == step)
                {
                    now = 0;
                    linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>(i, NowNode));
                }
                else
                {
                    now++;
                }
            }
            if (linkedListMain.Last != linkedListAdditional.Last.Value.second)
            {
                linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>
                    (linkedListMain.Count - 1, linkedListMain.Last));
            }
        }

        private void IncreaseReferenceIndexes(int BeginIndex)
        {
            if (linkedListMain.Count == 2)
            {
                InitReferences();
                return;
            }
            LinkedListNode<SimplePair<int, LinkedListNode<T>>> NowNode = null;
            int maxstep = 0;
            for (int i = 0; i < linkedListAdditional.Count; i++)
            {
                if (NowNode == null)
                {
                    NowNode = linkedListAdditional.First;
                }
                else
                {
                    NowNode = NowNode.Next;
                }
                if (NowNode.Value.first >= BeginIndex)
                {
                    NowNode.Value.first++;
                }
                if (NowNode.Previous != null)
                {
                    maxstep = Math.Max(maxstep, NowNode.Value.first - NowNode.Previous.Value.first);
                }
            }
            if (maxstep > step * 2)
            {
                InitReferences();
            }
        }

        public override string ToString()
        {
            return String.Join(" ", linkedListMain);
        }
    }
}

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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;
        static Random rnd = new Random();

        enum Direction { Vertical, Horizontal }

        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            if (File.Exists("input.txt"))
            {
                sr.Close();
                sw.Close();
            }
        }

        static void Solve()
        {
            int n = ReadInt(), a = ReadInt(), b = ReadInt();
            int i = 1;
            while (Can(n, a, b, i))
                i++;
            sw.WriteLine(i - 1);
        }

        static bool Can(int n, int a, int b, int x)
        {
            return n <= (a / x) + (b / x);
        }

        static int[][] GetReverseMatrix(int[][] a)
        {
            int[][] answer = new int[a[0].Length][];
            for (int i = 0; i < a[0].Length; i++)
            {
                answer[i] = new int[a.Length];
                for (int j = 0; j < a.Length; j++)
                    answer[i][j] = a[j][i];
            }
            return answer;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static double getArithmeticProgressionSum(int n)
        {
            return (n * (n + 1)) / 2;
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static Graph ReadGraph()
        {
            return ReadGraph(ReadInt(), ReadInt());
        }

        static Graph ReadGraph(int n, int m)
        {
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
            }
            return new Graph(n, a, b);
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser)
            where T : IComparable<T>
        {
            return ReadGraph<T>(parser, ReadInt(), ReadInt());
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser, int n, int m)
            where T : IComparable<T>
        {
            int[] a = new int[m];
            int[] b = new int[m];
            T[] c = new T[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
                c[i] = Read<T>(sr, parser);
            }
            return new Graph<T>(n, a, b, c);
        }

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static int[] ReadArrayInt(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static char[][] ReadMatrixChar(int n, int m)
        {
            char[][] answer = new char[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = ReadString().ToCharArray();
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        protected int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public int GetLength()
        {
            return Edges.Length;
        }

        public int GetLength(int n)
        {
            return Edges[n].Length;
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i])
                {
                    temp[a[i] - 1]++;
                    temp[b[i] - 1]++;
                }
                else
                {
                    temp[a[i] - 1]++;
                }
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                    Edges[b[j] - 1][temp[b[j] - 1]++] = a[j] - 1;
                }
                else
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            foreach (var i in Edges)
            {
                foreach (var j in i)
                {
                    answer += (j + 1) + " ";
                }
                answer += Environment.NewLine;
            }
            return answer;
        }
    }

    class Graph<T> : Graph
        where T : IComparable<T>
    {
        public T[][] Cost;

        public T GetCost(int x, int y) => Cost[x][y];

        public void SetCost(T a, int x, int y) => Cost[x][y] = a;

        public Graph(int n, int[] a, int[] b, T[] c) : base(n, a, b)
        {
            this.GenerateEdges(n, a, b, c);
        }

        private void GenerateEdges(int n, int[] a, int[] b, T[] c)
        {
            Cost = new T[n][];
            for (int i = 0; i < n; i++)
            {
                Cost[i] = new T[Edges[i].Length];
            }
            int[] temp = new int[n];

            for (int j = 0; j < c.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                    Cost[b[j] - 1][temp[b[j] - 1]++] = c[j];
                }
                else
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            for (int i = 0; i < Cost.Length; i++)
            {
                for (int j = 0; j < Cost[i].Length; j++)
                {
                    answer += (i + 1) + " " + (Edges[i][j] + 1) + " " + Cost[i][j] + Environment.NewLine;
                }
            }
            return answer;
        }
    }

    class SimplePair<U, V>
    {
        public U first;
        public V second;
        public SimplePair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

    }

    struct Pair<U, V> : IComparable<Pair<U, V>>
        where U : IComparable<U>
        where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }

    class SuperList<T>
    {
        protected LinkedList<T> linkedListMain;
        protected LinkedList<SimplePair<int, LinkedListNode<T>>> linkedListAdditional;
        int step = 0;
        public int resize = 0;

        public SuperList(IEnumerable<T> input)
        {
            Init(input);
        }

        public int Count { get { return linkedListMain.Count; } }

        public T this[int index]
        {
            get
            {
                return GetNode(index).Value;
            }
            set
            {
                GetNode(index).Value = value;
            }
        }

        public void AddValueToIndex(int index, T value)
        {
            if (index > linkedListMain.Count || index < 0)
            {
                throw new IndexOutOfRangeException();
            }
            if (index == linkedListMain.Count)
            {
                linkedListMain.AddLast(value);
                linkedListAdditional.Last.Value.second = linkedListMain.Last;
                linkedListAdditional.Last.Value.first = linkedListMain.Count - 1;
                IncreaseReferenceIndexes(index + 1);
                return;
            }
            if (index == 0)
            {
                linkedListMain.AddFirst(value);
                linkedListAdditional.First.Value.second = linkedListMain.First;
                IncreaseReferenceIndexes(1);
                return;
            }
            linkedListMain.AddBefore(GetNode(index), value);
            IncreaseReferenceIndexes(index);
        }

        private LinkedListNode<T> GetNode(int index)
        {
            var NowNode = linkedListAdditional.First;
            while (NowNode != linkedListAdditional.Last
                && NowNode.Value.first < index)
            {
                NowNode = NowNode.Next;
            }
            var NodeAnswer = NowNode.Value.second;
            int i = NowNode.Value.first;
            while (i > index)
            {
                i--;
                NodeAnswer = NodeAnswer.Previous;
            }
            while (i < index)
            {
                i++;
                NodeAnswer = NodeAnswer.Next;
            }
            return NodeAnswer;
        }

        private void Init(IEnumerable<T> input)
        {
            linkedListMain = new LinkedList<T>();
            foreach (T iter in input)
            {
                linkedListMain.AddLast(iter);
            }
            InitReferences();
        }

        private void InitReferences()
        {
            resize++;
            linkedListAdditional = new LinkedList<SimplePair<int, LinkedListNode<T>>>();
            step = Math.Max(1, (int)Math.Sqrt(linkedListMain.Count));
            int now = step;
            LinkedListNode<T> NowNode = null;
            for (int i = 0; i < linkedListMain.Count; i++)
            {
                if (NowNode == null)
                    NowNode = linkedListMain.First;
                else
                    NowNode = NowNode.Next;
                if (now == step)
                {
                    now = 0;
                    linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>(i, NowNode));
                }
                else
                {
                    now++;
                }
            }
            if (linkedListMain.Last != linkedListAdditional.Last.Value.second)
            {
                linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>
                    (linkedListMain.Count - 1, linkedListMain.Last));
            }
        }

        private void IncreaseReferenceIndexes(int BeginIndex)
        {
            if (linkedListMain.Count == 2)
            {
                InitReferences();
                return;
            }
            LinkedListNode<SimplePair<int, LinkedListNode<T>>> NowNode = null;
            int maxstep = 0;
            for (int i = 0; i < linkedListAdditional.Count; i++)
            {
                if (NowNode == null)
                {
                    NowNode = linkedListAdditional.First;
                }
                else
                {
                    NowNode = NowNode.Next;
                }
                if (NowNode.Value.first >= BeginIndex)
                {
                    NowNode.Value.first++;
                }
                if (NowNode.Previous != null)
                {
                    maxstep = Math.Max(maxstep, NowNode.Value.first - NowNode.Previous.Value.first);
                }
            }
            if (maxstep > step * 2)
            {
                InitReferences();
            }
        }

        public override string ToString()
        {
            return String.Join(" ", linkedListMain);
        }
    }
}

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

namespace ConsoleApplication1
{

    class Program
    {

        static TextReader sr;
        static TextWriter sw;
        static Random rnd = new Random();

        enum Direction { Vertical, Horizontal }

        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                sr = new StreamReader("input.txt");
                sw = new StreamWriter("output.txt");
            }
            else
            {
                sr = Console.In;
                sw = Console.Out;
            }
            Solve();
            if (File.Exists("input.txt"))
            {
                sr.Close();
                sw.Close();
            }
        }

        static void Solve()
        {
            int n = ReadInt(), a = ReadInt(), b = ReadInt();
            int i = 1;
            int answer = 1;
            while (i < 10000)
            {
                if (Can(n, a, b, i))
                    answer = i;
                i++;
            }
            sw.WriteLine(i - 1);
        }

        static bool Can(int n, int a, int b, int x)
        {
            return n <= (a / x) + (b / x);
        }

        static int[][] GetReverseMatrix(int[][] a)
        {
            int[][] answer = new int[a[0].Length][];
            for (int i = 0; i < a[0].Length; i++)
            {
                answer[i] = new int[a.Length];
                for (int j = 0; j < a.Length; j++)
                    answer[i][j] = a[j][i];
            }
            return answer;
        }

        static long getManhattan(Pair<long, long> a, Pair<long, long> b)
        {
            return Math.Abs(a.first - b.first) + Math.Abs(a.second - b.second);
        }

        static double getArithmeticProgressionSum(int n)
        {
            return (n * (n + 1)) / 2;
        }

        static string[] buffer = new string[0];
        static int counterbuffer = 0;

        static Graph ReadGraph()
        {
            return ReadGraph(ReadInt(), ReadInt());
        }

        static Graph ReadGraph(int n, int m)
        {
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
            }
            return new Graph(n, a, b);
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser)
            where T : IComparable<T>
        {
            return ReadGraph<T>(parser, ReadInt(), ReadInt());
        }

        static Graph<T> ReadGraph<T>(Parser<T> parser, int n, int m)
            where T : IComparable<T>
        {
            int[] a = new int[m];
            int[] b = new int[m];
            T[] c = new T[m];
            for (int i = 0; i < m; i++)
            {
                a[i] = ReadInt();
                b[i] = ReadInt();
                c[i] = Read<T>(sr, parser);
            }
            return new Graph<T>(n, a, b, c);
        }

        static int[] ReadArrayInt()
        {
            return sr.ReadLine().Split(' ').Select(int.Parse).ToArray();
        }

        static int[] ReadArrayInt(int n)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = ReadInt();
            }
            return a;
        }

        static long[] ReadArrayLong()
        {
            return sr.ReadLine().Split(' ').Select(long.Parse).ToArray();
        }

        static int[][] ReadMatrixInt(int n, int m)
        {
            int[][] answer = new int[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new int[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadInt();
                }
            }
            return answer;
        }

        static long[][] ReadMatrixLong(int n, int m)
        {
            long[][] answer = new long[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = new long[m];
                for (int j = 0; j < m; j++)
                {
                    answer[i][j] = ReadLong();
                }
            }
            return answer;
        }

        static char[][] ReadMatrixChar(int n, int m)
        {
            char[][] answer = new char[n][];
            for (int i = 0; i < n; i++)
            {
                answer[i] = ReadString().ToCharArray();
            }
            return answer;
        }

        static BigInteger ReadBigInteger()
        {
            return ReadBigInteger(sr);
        }

        static BigInteger ReadBigInteger(TextReader sr)
        {
            return Read<BigInteger>(sr, BigInteger.Parse);
        }

        static int ReadInt()
        {
            return ReadInt(sr);
        }

        static int ReadInt(TextReader sr)
        {
            return Read<int>(sr, int.Parse);
        }

        static long ReadLong()
        {
            return ReadLong(sr);
        }

        static long ReadLong(TextReader sr)
        {
            return Read<long>(sr, long.Parse);
        }

        static double ReadDouble()
        {
            return ReadDouble(sr);
        }

        static double ReadDouble(TextReader sr)
        {
            return Read<double>(sr, double.Parse);
        }

        static string ReadString()
        {
            return ReadString(sr);
        }

        static string ReadString(TextReader sr)
        {
            return Read<string>(sr, x => x);
        }

        static U Read<U>(TextReader sr, Parser<U> parser)
        {
            if (counterbuffer >= buffer.Length)
            {
                buffer = sr.ReadLine().Split(' ').ToArray();
                while (buffer.Length == 0)
                {
                    buffer = sr.ReadLine().Split(' ').ToArray();
                }
                counterbuffer = 0;
            }
            return parser(buffer[counterbuffer++]);
        }
    }

    public delegate U Parser<U>(string str);

    class Graph
    {
        protected int[][] Edges;
        public int this[int val1, int val2]
        {
            get
            {
                return Edges[val1][val2];
            }
            set
            {
                Edges[val1][val2] = value;
            }
        }

        public int GetLength()
        {
            return Edges.Length;
        }

        public int GetLength(int n)
        {
            return Edges[n].Length;
        }

        public Graph(int n, int[] a, int[] b)
        {
            generateEdges(n, a, b);
        }

        private void generateEdges(int n, int[] a, int[] b)
        {
            int[] temp = new int[n];
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] != b[i])
                {
                    temp[a[i] - 1]++;
                    temp[b[i] - 1]++;
                }
                else
                {
                    temp[a[i] - 1]++;
                }
            }
            Edges = new int[n][];
            for (int i = 0; i < n; i++)
            {
                Edges[i] = new int[temp[i]];
            }
            for (int i = 0; i < n; i++)
            {
                temp[i] = 0;
            }
            for (int j = 0; j < a.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                    Edges[b[j] - 1][temp[b[j] - 1]++] = a[j] - 1;
                }
                else
                {
                    Edges[a[j] - 1][temp[a[j] - 1]++] = b[j] - 1;
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            foreach (var i in Edges)
            {
                foreach (var j in i)
                {
                    answer += (j + 1) + " ";
                }
                answer += Environment.NewLine;
            }
            return answer;
        }
    }

    class Graph<T> : Graph
        where T : IComparable<T>
    {
        public T[][] Cost;

        public T GetCost(int x, int y) => Cost[x][y];

        public void SetCost(T a, int x, int y) => Cost[x][y] = a;

        public Graph(int n, int[] a, int[] b, T[] c) : base(n, a, b)
        {
            this.GenerateEdges(n, a, b, c);
        }

        private void GenerateEdges(int n, int[] a, int[] b, T[] c)
        {
            Cost = new T[n][];
            for (int i = 0; i < n; i++)
            {
                Cost[i] = new T[Edges[i].Length];
            }
            int[] temp = new int[n];

            for (int j = 0; j < c.Length; j++)
            {
                if (a[j] != b[j])
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                    Cost[b[j] - 1][temp[b[j] - 1]++] = c[j];
                }
                else
                {
                    Cost[a[j] - 1][temp[a[j] - 1]++] = c[j];
                }
            }
        }

        public override string ToString()
        {
            string answer = "";
            for (int i = 0; i < Cost.Length; i++)
            {
                for (int j = 0; j < Cost[i].Length; j++)
                {
                    answer += (i + 1) + " " + (Edges[i][j] + 1) + " " + Cost[i][j] + Environment.NewLine;
                }
            }
            return answer;
        }
    }

    class SimplePair<U, V>
    {
        public U first;
        public V second;
        public SimplePair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

    }

    struct Pair<U, V> : IComparable<Pair<U, V>>
        where U : IComparable<U>
        where V : IComparable<V>
    {
        public U first;
        public V second;
        public Pair(U first, V second)
        {
            this.first = first;
            this.second = second;
        }

        public int CompareTo(Pair<U, V> b)
        {
            if (first.CompareTo(b.first) == 0)
            {
                return second.CompareTo(b.second);
            }
            return first.CompareTo(b.first);
        }
    }

    class SuperList<T>
    {
        protected LinkedList<T> linkedListMain;
        protected LinkedList<SimplePair<int, LinkedListNode<T>>> linkedListAdditional;
        int step = 0;
        public int resize = 0;

        public SuperList(IEnumerable<T> input)
        {
            Init(input);
        }

        public int Count { get { return linkedListMain.Count; } }

        public T this[int index]
        {
            get
            {
                return GetNode(index).Value;
            }
            set
            {
                GetNode(index).Value = value;
            }
        }

        public void AddValueToIndex(int index, T value)
        {
            if (index > linkedListMain.Count || index < 0)
            {
                throw new IndexOutOfRangeException();
            }
            if (index == linkedListMain.Count)
            {
                linkedListMain.AddLast(value);
                linkedListAdditional.Last.Value.second = linkedListMain.Last;
                linkedListAdditional.Last.Value.first = linkedListMain.Count - 1;
                IncreaseReferenceIndexes(index + 1);
                return;
            }
            if (index == 0)
            {
                linkedListMain.AddFirst(value);
                linkedListAdditional.First.Value.second = linkedListMain.First;
                IncreaseReferenceIndexes(1);
                return;
            }
            linkedListMain.AddBefore(GetNode(index), value);
            IncreaseReferenceIndexes(index);
        }

        private LinkedListNode<T> GetNode(int index)
        {
            var NowNode = linkedListAdditional.First;
            while (NowNode != linkedListAdditional.Last
                && NowNode.Value.first < index)
            {
                NowNode = NowNode.Next;
            }
            var NodeAnswer = NowNode.Value.second;
            int i = NowNode.Value.first;
            while (i > index)
            {
                i--;
                NodeAnswer = NodeAnswer.Previous;
            }
            while (i < index)
            {
                i++;
                NodeAnswer = NodeAnswer.Next;
            }
            return NodeAnswer;
        }

        private void Init(IEnumerable<T> input)
        {
            linkedListMain = new LinkedList<T>();
            foreach (T iter in input)
            {
                linkedListMain.AddLast(iter);
            }
            InitReferences();
        }

        private void InitReferences()
        {
            resize++;
            linkedListAdditional = new LinkedList<SimplePair<int, LinkedListNode<T>>>();
            step = Math.Max(1, (int)Math.Sqrt(linkedListMain.Count));
            int now = step;
            LinkedListNode<T> NowNode = null;
            for (int i = 0; i < linkedListMain.Count; i++)
            {
                if (NowNode == null)
                    NowNode = linkedListMain.First;
                else
                    NowNode = NowNode.Next;
                if (now == step)
                {
                    now = 0;
                    linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>(i, NowNode));
                }
                else
                {
                    now++;
                }
            }
            if (linkedListMain.Last != linkedListAdditional.Last.Value.second)
            {
                linkedListAdditional.AddLast(new SimplePair<int, LinkedListNode<T>>
                    (linkedListMain.Count - 1, linkedListMain.Last));
            }
        }

        private void IncreaseReferenceIndexes(int BeginIndex)
        {
            if (linkedListMain.Count == 2)
            {
                InitReferences();
                return;
            }
            LinkedListNode<SimplePair<int, LinkedListNode<T>>> NowNode = null;
            int maxstep = 0;
            for (int i = 0; i < linkedListAdditional.Count; i++)
            {
                if (NowNode == null)
                {
                    NowNode = linkedListAdditional.First;
                }
                else
                {
                    NowNode = NowNode.Next;
                }
                if (NowNode.Value.first >= BeginIndex)
                {
                    NowNode.Value.first++;
                }
                if (NowNode.Previous != null)
                {
                    maxstep = Math.Max(maxstep, NowNode.Value.first - NowNode.Previous.Value.first);
                }
            }
            if (maxstep > step * 2)
            {
                InitReferences();
            }
        }

        public override string ToString()
        {
            return String.Join(" ", linkedListMain);
        }
    }
}

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

namespace Two_Cakes
{
    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)
        {
            writer.WriteLine(Solve(args));
            writer.Flush();
        }

        private static int Solve(string[] args)
        {
            int n = Next();
            int a = Next();
            int b = Next();

            for (int i = (a + b)/n; i > 0; i--)
            {
                if (a/i + b/i >= n)
                    return i;
            }

            return 1;
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

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

namespace Problem911B
{
    class Program
    {
        static void Main(string[] args)
        {
            var pars = Console.ReadLine().Split(' ').Select(_ => int.Parse(_)).ToArray();
            int n = pars[0], a = pars[1], b = pars[2];
            for (int i = 200; i >= 0; i--)
            {
                if (a / i + b / i >= n)
                {
                    Console.WriteLine(i);
                    return;
                }
            }
        }
    }
}

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

namespace ConsoleApp12
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, n;
            var inputs = (Console.ReadLine().Split().Select(x => int.Parse(x))).ToList();
            for (int i = 400; i > 0; --i)
            {
                if (inputs[1] / i + inputs[2] / i >= inputs[0])
                {
                    Console.WriteLine(i);
                    break;
                }
            }
        }
    }
}

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

namespace ConsoleApp12
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, n;
            var inputs = (Console.ReadLine().Split().Select(x => int.Parse(x))).ToList();
            for (int i = 200; i > 0; --i)
            {
                if (inputs[1] / i + inputs[2] / i >= inputs[0])
                {
                    Console.WriteLine(i);
                    break;
                }
            }
        }
    }
}

using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        double platesCount = inputData[0];
        double firstCakePieces = inputData[1];
        double secondCakePieces = inputData[2];

        double piecesOnFirstPlate;
        double piecesOnSecondPlate;

        double biggestPart;

        int findedValue;

        if (firstCakePieces + secondCakePieces == platesCount)
        {
            findedValue = 1;
        }
        else
        {
            if (firstCakePieces > secondCakePieces)
            {
                biggestPart = Math.Ceiling(platesCount * secondCakePieces / firstCakePieces);
                piecesOnFirstPlate = firstCakePieces / biggestPart;
                piecesOnSecondPlate = secondCakePieces / (platesCount - biggestPart);
            }
            else
            {
                biggestPart = Math.Ceiling(platesCount * firstCakePieces / secondCakePieces);
                piecesOnFirstPlate = firstCakePieces / (platesCount - biggestPart);
                piecesOnSecondPlate = secondCakePieces / biggestPart;
            }

            findedValue = (int) (piecesOnFirstPlate < piecesOnSecondPlate ? piecesOnFirstPlate : piecesOnSecondPlate);
        }

        Console.WriteLine(findedValue);
        Console.ReadLine();
    }
}

using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
	int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

		double platesCount = inputData[0];
		double firstCakePieces = inputData[1];
		double secondCakePieces = inputData[2];

		int findedValue;

		if (firstCakePieces + secondCakePieces == platesCount || firstCakePieces == secondCakePieces)
		{
			findedValue = (int)((firstCakePieces + secondCakePieces) / platesCount);
		}
		else
		{
			double piecesOnFirstPlate;
			double piecesOnSecondPlate;
			double lessPart = firstCakePieces > secondCakePieces
				? Math.Ceiling(platesCount * secondCakePieces / firstCakePieces)
				: Math.Ceiling(platesCount * firstCakePieces / secondCakePieces);

			if (firstCakePieces > secondCakePieces)
			{
				piecesOnFirstPlate = firstCakePieces / (platesCount - lessPart);
				piecesOnSecondPlate = secondCakePieces / lessPart;
			}
			else
			{
				piecesOnFirstPlate = firstCakePieces / lessPart;
				piecesOnSecondPlate = secondCakePieces / (platesCount - lessPart);
			}

			findedValue = (int) (piecesOnFirstPlate < piecesOnSecondPlate ? Math.Ceiling(piecesOnFirstPlate) : Math.Ceiling(piecesOnSecondPlate));
		}

		Console.WriteLine(findedValue);

        Console.ReadLine();
    }
}

using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        int platesCount = inputData[0];
        int firstCakePieces = inputData[1];
        int secondCakePieces = inputData[2];

        int commonPieces = firstCakePieces + secondCakePieces;
        int minPiecesOnPlate = commonPieces / platesCount;

        int findedValue;

        if (commonPieces == platesCount || firstCakePieces == secondCakePieces)
        {
            findedValue = minPiecesOnPlate;
        }
        else if (firstCakePieces < minPiecesOnPlate)
        {
            findedValue = firstCakePieces;
        }
        else if (secondCakePieces < minPiecesOnPlate)
        {
            findedValue = secondCakePieces;
        }
        else
        {
            while (true)
            {
                int minPiecesFromFirstCake = firstCakePieces / minPiecesOnPlate;
                int minPiecesFromSecondCake = secondCakePieces / minPiecesOnPlate;

                if (minPiecesFromFirstCake + minPiecesFromSecondCake >= platesCount)
                {
                    break;
                }
                minPiecesOnPlate--;
            }
            findedValue = minPiecesOnPlate;
        }

        Console.WriteLine(findedValue);
        Console.ReadLine();
    }
}

using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        double platesCount = inputData[0];
        double firstCakePieces = inputData[1];
        double secondCakePieces = inputData[2];

        double piecesOnFirstPlate;
        double piecesOnSecondPlate;

        double biggestPart;

        int findedValue;

        if (firstCakePieces + secondCakePieces == platesCount || firstCakePieces == secondCakePieces)
        {
            findedValue = (int)((firstCakePieces + secondCakePieces) / platesCount);
        }
        else
        {
            if (firstCakePieces > secondCakePieces)
            {
                biggestPart = Math.Ceiling(platesCount * secondCakePieces / firstCakePieces);
                piecesOnFirstPlate = firstCakePieces / biggestPart;
                piecesOnSecondPlate = secondCakePieces / (platesCount - biggestPart);
            }
            else
            {
                biggestPart = Math.Ceiling(platesCount * firstCakePieces / secondCakePieces);
                piecesOnFirstPlate = firstCakePieces / (platesCount - biggestPart);
                piecesOnSecondPlate = secondCakePieces / biggestPart;
            }

            findedValue = (int) (piecesOnFirstPlate < piecesOnSecondPlate ? piecesOnFirstPlate : piecesOnSecondPlate);
        }

        Console.WriteLine(findedValue);
        Console.ReadLine();
    }
}

using System;
using System.Linq;

class Program
{
    private static void Main(string[] args)
    {
        int[] inputData = Console.ReadLine().Split(' ').Select(item => Int32.Parse(item)).ToArray();

        int platesCount = inputData[0];
        int firstCakePieces = inputData[1];
        int secondCakePieces = inputData[2];

        int commonPieces = firstCakePieces + secondCakePieces;
        int minPiecesOnPlate = commonPieces / platesCount;

        int findedValue;

        if (commonPieces == platesCount || firstCakePieces == secondCakePieces)
        {
            findedValue = minPiecesOnPlate;
        }
        else if(firstCakePieces < minPiecesOnPlate)
        {
            findedValue = firstCakePieces;
        }
        else if(secondCakePieces < minPiecesOnPlate)
        {
            findedValue = secondCakePieces;
        }
        else
        {
            int minPiecesFromFirstCake = firstCakePieces / minPiecesOnPlate;
            int minPiecesFromSecondCake = secondCakePieces / minPiecesOnPlate;
            findedValue = minPiecesFromFirstCake + minPiecesFromSecondCake == platesCount
                ? minPiecesOnPlate
                : minPiecesOnPlate - 1;
        }

        Console.WriteLine(findedValue);
        Console.ReadLine();
    }
}

using System;
using System.Linq;
using CompLib.Util;

public class Program
{

    public void Solve()
    {
        var sc = new Scanner();
        int n = sc.NextInt();
        int a = sc.NextInt();
        int b = sc.NextInt();

        /*
         * n人　n枚皿
         *
         * a個、b個
         */

        int ans = int.MaxValue;
        for (int i = 1; i < n; i++)
        {
            int aa = (a + i - 1) / i;
            int bb = (b + (n - i) - 1) / (n - i);

            ans = Math.Min(ans, Math.Min(aa,bb));
        }

        Console.WriteLine(ans);
    }

    public static void Main(string[] args) => new Program().Solve();
}

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.Linq;
using System.Collections.Generic;

class P
{
    static void Main()
    {
        int[] NAB = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int N = NAB[0];
        int A = NAB[1];
        int B = NAB[2];
        for (int i = (A + B) / N; i >= 1; i--)
        {
            if (A / i + B / i >= N)
            {
                Console.WriteLine(i);
                break;
            }
        }
    }
}