To find the total number of leftover cakes, we first need to find a common denominator for the fractions given.
The common denominator for 2/3, 5/6, 1/2, and 1/3 is 6.
Converting the fractions:
2/3 = 4/6
5/6 = 5/6
1/2 = 3/6
1/3 = 2/6
Adding these fractions together:
4/6 + 5/6 + 3/6 + 2/6 = 14/6
Now, we need to simplify the fraction:
14/6 = 7/3
Therefore, the restaurant had 7/3 leftover cakes after dinner on Wednesday night, which is equivalent to 2 cakes with a remainder of 1/3 of a cake. So, the total number of leftover cakes is 2