N = int(input()) #1行目のNを取得 s = list(map(int,input().split())) for i in range(len(s)-1): if(abs(s[i+1]-s[i])