Something happened in Uzhlyandia again... There are riots on the streets... Famous Uzhlyandian superheroes Shean the Sheep and Stas the Giraffe were called in order to save the situation. Upon the arriving, they found that citizens are worried about maximum values of the Main Uzhlyandian Function *f*, which is defined as follows:

In the above formula, 1 ≤ *l* &lt; *r* ≤ *n* must hold, where *n* is the size of the Main Uzhlyandian Array *a*, and |*x*| means absolute value of *x*. But the heroes skipped their math lessons in school, so they asked you for help. Help them calculate the maximum value of *f* among all possible values of *l* and *r* for the given array *a*.
The first line contains single integer *n* (2 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the size of the array *a*.

The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (-10<sup class="upper-index">9</sup> ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the array elements.
In the first sample case, the optimal value of *f* is reached on intervals [1, 2] and [2, 5].

In the second case maximal value of *f* is reachable only on the whole array.
5
1 4 2 3 1
3
4
1 5 4 7
6
8
16 14 12 10 8 100 50 0
92
2
1 1
0
50
-5 -9 0 44 -10 37 34 -49 11 -22 -26 44 8 -13 23 -46 34 12 -24 2 -40 -15 -28 38 -40 -42 -42 7 -43 5 2 -11 10 43 9 49 -13 36 2 24 46 50 -15 -26 -6 -6 8 4 -44 -3
208
100
23 64 60 -45 -36 -64 -59 15 -75 69 -30 -7 -20 17 -77 58 93 -76 -98 -22 -31 16 -50 6 -20 -85 1 64 -88 -8 -15 -6 -57 25 91 10 2 -90 74 -66 -42 73 28 49 -85 59 96 79 -25 49 -59 -89 -75 12 -96 -33 -65 -8 -100 -81 17 99 -91 -5 7 -21 1 85 63 86 -26 85 -31 11 -75 35 -82 15 98 93 -55 66 70 36 -38 8 92 -63 -5 60 -78 -7 -22 -1 4 54 36 16 32 -20
632
3
0 0 0
0
3
0 1 -1
2
5
1000000000 0 0 1000000000 -1000000000
2000000000
2
1000000000 -1000000000
2000000000
4
1000000000 0 0 -1000000000
2000000000
4
1 0 1 0
1
5
0 10 20 30 40
10
2
-1000000000 1000000000
2000000000
2
1 2
1
9
1000000000 0 0 1000000000 1000000000 0 0 1000000000 1000000000
4000000000
16
-1000000000 1000000000 1000000000 -1000000000 -1000000000 1000000000 1000000000 -1000000000 -1000000000 1000000000 1000000000 -1000000000 -1000000000 1000000000 1000000000 -1000000000
16000000000
6
1000000000 0 0 1000000000 1000000000 0
3000000000
17
1000000000 0 0 1000000000 1000000000 0 0 1000000000 1000000000 0 0 1000000000 1000000000 0 0 1000000000 1000000000
8000000000
11
1000000000 0 1 1000000000 999999999 1 0 1000000000 999999999 1 1000000000
4999999991
4
1000000000 -1000000000 -1000000000 1000000000
4000000000
10
1000000000 -1000000000 -1000000000 1000000000 1000000000 -1000000000 -1000000000 1000000000 1000000000 -1000000000
10000000000
n=int(input())
w=[int(k) for k in input().split()]
a=[]
for j in range(1, len(w)):
    a.append(abs(w[j]-w[j-1]))
b, c=[], []
for j in range(len(a)):
    if j%2:
        b.append(-a[j])
        c.append(a[j])
    else:
        b.append(a[j])
        c.append(-a[j])
res=0

x, y=[], []
q=0
for j in b:
    x.append(q)
    q+=j
x.append(q)
q=0
for j in c:
    y.append(q)
    q+=j
y.append(q)

"""print(b)
print(c)
print(x)
print(y)"""

mx, mn=0, 0
for j in x:
    mx=max(mx, j)
    mn=min(mn, j)
    res=max(res, mx-mn)
mx, mn=0, 0
for j in y:
    mx=max(mx, j)
    mn=min(mn, j)
    res=max(res, mx-mn)
print(res)