using System.Collections.Generic;
public static void Main()
List<long> numbers = new List<long>();
StringBuilder sequence = new StringBuilder();
long n = long.Parse(Console.ReadLine());
string[,] matrix = new string[height, width];
for (int row = 0; row < height; row++)
for (int col = width - 1; col >= 0; col--)
long digit = numbers[row] & (1 << col);
matrix[row, (width - 1) - col] = ".";
matrix[row, (width - 1) - col] = "B";
for (int row = 0; row < height; row++)
for (int col = 0; col < width; col++)
if (matrix[row, col] == ".")
for (int row = 0; row < height; row++)
for (int col = width - 1; col >= 0; col--)
if (matrix[row, col] == ".")
for (int row = 0; row < height; row++)
StringBuilder binNum = new StringBuilder();
for (int col = 0; col < width; col++)
if (matrix[row, col] == "B")
for (int i = binNum.Length - 1; i >= 0; i--)
result += (long)(digit * (Math.Pow(2, pow)));
Console.WriteLine(result);