using static System.Math; using System; public class Hello { static void Main() { var n = long.Parse(Console.ReadLine().Trim()); var p = 0; for (int i = 0; i <= 60; i++) { if (((n >> i) & 1) == 1) p = Max(p, i); } Console.WriteLine(1L << p); } }