Instructions: In this task, you are given two sets, and you need to count the number of elements at the union of two given sets. A Set is shown by two curly braces and comma-separated numbers inside, like {1, 2, 3}. Union of two given sets is the smallest set which contains all the elements of both the sets. To find the union of two given sets, A and B is a set that consists of all the elements of A and all the elements of B such that no element is repeated.
Input: Set1: '{16, 3, 12}', Set2: '{1, 2, 5, 8, 13, 14, 18}'. How many elements are there in the union of Set1 and Set2 ?
Output:
10