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

Input: Consider Input: [28, 36, 44, 52, 60, 68, 76, 84, 92, 100, 108]

Output: 1


Input: Consider Input: [48, 71, 3, 82, 87, 96, 86, 57, 69, 59]

Output: 2


Input: Consider Input: [94, 77, 79, 78, 20, 52, 24, 70, 5, 28]


Output: 2