Recently Luba learned about a special kind of numbers that she calls beautiful numbers. The number is called beautiful iff its binary representation consists of *k* + 1 consecutive ones, and then *k* consecutive zeroes.

Some examples of beautiful numbers: 
 -  1<sub class="lower-index">2</sub> (1<sub class="lower-index">10</sub>); -  110<sub class="lower-index">2</sub> (6<sub class="lower-index">10</sub>); -  1111000<sub class="lower-index">2</sub> (120<sub class="lower-index">10</sub>); -  111110000<sub class="lower-index">2</sub> (496<sub class="lower-index">10</sub>). 
More formally, the number is beautiful iff there exists some positive integer *k* such that the number is equal to (2<sup class="upper-index">*k*</sup> - 1) * (2<sup class="upper-index">*k* - 1</sup>).

Luba has got an integer number *n*, and she wants to find its greatest beautiful divisor. Help her to find it!
The only line of input contains one number *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the number Luba has got.
none
3
1
992
496
81142
1
76920
120
2016
2016
1
1
6
6
32640
32640
12096
2016
55948
1
47262
6
22876
28
96120
120
42160
496
38304
2016
89408
8128
97920
32640
55493
1
38021
1
21445
1
100000
1
497
1
240
120
21204
6
65536
1
364
28
1024
1
36
6
28
28
14400
120
10080
2016
9
1
2
1
42
6
83160
120
65534
1
1026
6
1025
1
1027
1
2018
1
2020
1
123
1
150
6
5
1
66
6
12768
28
156
6
99990
6
248
1
#include <stdio.h> // Pre Processor Directive (start with #)
#define PI 3.14    // Another Pre Processor Directive which sets value of PI as 3.14. It will replace PI with 3.14 whenever it appears in our code. This is better than declaring variables because sometimes we might change their value on accident which will affect the code.
/* C Programme is a collection of functions of the form return_type function_name(parameter)
{
    sequence of statements
}
*/
void main() // main is a special type of function because execution of code starts from first line of main
{
    printf("Hello World!\n");         // printf function is part of standard C library
    int a;                            // Variable Declaration Statement
    printf("Enter the value of a: "); // Prompt input from user
    scanf("%d", &a);                  // Reads input from user.%d  tells that we are reading an integer and &a stores that input to the memory alloted for variable a

    printf("The value you entered is %d\n", a);
}
/* How to compile file without using code runner extension using gcc
Go to terminal and type gcc file_name.c -o new_final_name.c 
A new file called new_final_name.c gets created
Do ./new_file_name.c to compile and run that file
*/