We use the formula
ns + (n-1)q <= t, where n = number o processes, q = time quantum, s = time of context switch and t = total time until the next context switch
so, calculation ..
5(s) + 4(50) <= (24 x 60 x 60 x 60) + (2 x 60 x 60) ms
=> 5(s) <= 5191000 ms
=> s <= 4.8 hours