using static System.Math; using System; public class Hello { static void Main() { var n = long.Parse(Console.ReadLine().Trim()); long ans = 1 << (int)(Log(n) / Log(2)); Console.WriteLine(ans); } }