using System; using System.Collections.Generic; using System.Linq; namespace lv1_804 { class Program { static void Main(string[] args) { int[] input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); int a = input[0], b = input[1], c = input[2], d = input[3]; var lst = new List() { a, b / c, d / (c + 1) }; Console.WriteLine(lst.Min()); } } }