It is known that x, y and Z are three nonnegative integers satisfying 3x + 2Y + Z = 5 and X + Y-Z = 2. If s = 2x + Y-Z, then the sum of the maximum and minimum of S is___ .

It is known that x, y and Z are three nonnegative integers satisfying 3x + 2Y + Z = 5 and X + Y-Z = 2. If s = 2x + Y-Z, then the sum of the maximum and minimum of S is___ .

Method 1: to make s take the maximum, 2x + y the maximum, z the minimum, ∵ x, y, Z are three non negative integers, ∵ z = 0, solve the equations 3x + 2Y = 5x + y = 2, the solution is: x = 1y = 1, ∵ s the maximum = 2 × 1 + 1-0 = 3; to make s take the minimum, the equations are established simultaneously 3x + 2Y + Z = 5 (1) x + Y-Z = 2 (2), (1) + (2) get 4x + 3Y = 7, y = 7-4x3, (1) - (2) × 2 get x + 3Z = 1, z = 1-x3, substituting y = 7-4x3, z = 1-x3 into S = 2x + Y-Z, sorting out, s = x + 2, when x takes the minimum value, s has the minimum value, ∵ x, y, Z are three non negative integers, ∵ X's minimum value is 1, ∵ s minimum = 3, ∵ s maximum and minimum value sum: 3 + 3 = 6; method 2: ∵ x + Y-Z = 2, s = 2x + Y-Z, The sum of the maximum and minimum of S is 3 + 3 = 6. Therefore, the answer is: 6