You are given an array of integers, check if it is monotonic or not. If the array is monotonic, then return 1, else return 2. An array is monotonic if it is either monotonically increasing or monotonocally decreasing. An array is monotonically increasing/decreasing if its elements increase/decrease as we move from left to right

Ex Input:
[35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105]

Ex Output:
1


Ex Input:
[148, 143, 138, 133, 128, 123, 118, 113, 108, 103, 98, 93, 88, 83, 78, 73, 68, 63, 58, 53, 48, 43, 38, 33, 28, 23]

Ex Output:
1


Ex Input:
[27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, 135, 144, 153]

Ex Output:

1