using System; class P { static void Main() { long N = Convert.ToInt64(Math.Pow(2, p() - 1)); int X = p(); int A = (X / p()) + 1; long B = ((N - 1 - X) / p()) + 1; Console.WriteLine(Math.Min(A,B)); } static int p() => int.Parse(Console.ReadLine()); }