S-4 Add solution for more complicated case