﻿//Description

//Using bitwise operators, write a program that uses an expression to find the value of the bit at index 3 of an
//unsigned integer read from the console.

//The bits are counted from right to left, starting from bit 0.
//The result of the expression should be either 1 or 0. Print it on the console.

namespace _11.ThirdBit
{
    using System;

    class FindThirdBit
    {
        static void Main()
        {
            int input = int.Parse(Console.ReadLine());

            int p = 3;
            int mask = 1 << p;
            int inputAndMask = input & mask;
            int bit = inputAndMask >> p;
            Console.WriteLine(bit);

        }
    }
}
