using System; namespace yukicoder { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int a = int.Parse(s[0]);//目の前の野菜 int b = int.Parse(s[1]);//目の前の肉 int c = int.Parse(s[2]);//1つの野菜を食べるための肉の数 int d = int.Parse(s[3]);//最大数 int count = 0; for(int i = 0; i < a; i++) { a -= 1; b -= c; if (b < 0) { break; } count++; if (b == 0) { break; } } Console.WriteLine(count); } } }