Given an integer array where each number occurs twice except for one of them, find the unique number.
Input: nums = [1, 3, 3, 2, 1] Output: 2
nums