Of the 48 oranges in a carton, one-third of them were rotten. Ben and David took the remaining good oranges. If Ben took 8 more oranges than David, how many oranges did David take?