This is one of the shortest stories in the Zhuangzi, an old Chinese book of stories and talks. It sits in the middle of a long conversation between two men, Tzŭ Ch'i and Tzŭ Yu. This page shows the story and the few lines after it, so it is part of a longer conversation.
Nobody knows how much of the book Zhuangzi wrote himself. The Stanford Encyclopedia of Philosophy explains that an editor named Guo Xiang, who died in 312 CE, linked only the first seven chapters, the "inner chapters", to Zhuangzi's own time. It adds that even this is a guess, and that the other chapters are thought to be by later writers. This story is in chapter two, one of the inner chapters. The encyclopedia names chapter two in particular as the part scholars most often treat as Zhuangzi's.
The English is by Herbert Giles, from 1889. Right below the story, it is explained a few lines at a time in plain words.
Rations are fixed shares of food. "Externals" means things outside yourself. "Contraries" are opposites. "Wherefore" means so, or that is why.
The story
"What is Three in the Morning?" asked Tzŭ Yu.
"A keeper of monkeys," replied Tzŭ Ch'i, "said with regard to their rations of chestnuts that each monkey was to have three in the morning and four at night. But at this the monkeys were very angry, so the keeper said they might have four in the morning and three at night, with which arrangement they were all well pleased. The actual number of the chestnuts remained the same, but there was an adaptation to the likes and dislikes of those concerned. Such is the principle of putting oneself into subjective relation with externals.
"Wherefore the true Sage, while regarding contraries as identical, adapts himself to the laws of Heaven. This is called following two courses at once.
From the Zhuangzi, chapter II, "The Identity of Contraries". Translated by Herbert A. Giles, Chuang Tzŭ: Mystic, Moralist, and Social Reformer (Bernard Quaritch, London, 1889), pages 20 and 21. Part of a longer conversation, which goes on after these lines.
In plain words
The story above is from the book. What follows is how lostaf reads it, a few lines at a time. It is one reading, and other readers may see more.
"What is Three in the Morning?" asked Tzŭ Yu.
Just before this, Tzŭ Ch'i has used "Three in the Morning" as a name for a certain mistake. In Giles's English it is wearing out your mind by holding tight to how things differ, without seeing that all things are one. His friend asks what the name means.
A keeper of monkeys … said … that each monkey was to have three in the morning and four at night. But at this the monkeys were very angry
A man who looked after monkeys told them they would get three chestnuts in the morning and four at night. The monkeys were furious.
so the keeper said they might have four in the morning and three at night, with which arrangement they were all well pleased.
So he offered four in the morning and three at night instead. Now they were all happy.
The actual number of the chestnuts remained the same, but there was an adaptation to the likes and dislikes of those concerned.
It was seven chestnuts a day either way. Nothing real had changed. The keeper simply went along with what the monkeys liked and disliked.
Such is the principle of putting oneself into subjective relation with externals.
This line is hard even in Giles's English. One plain way to put it: seeing things from where the others stand, and not only from where you stand. That is what the keeper did.
Wherefore the true Sage, while regarding contraries as identical, adapts himself to the laws of Heaven.
So a wise person does not get stuck on which of two opposites is the right one. He fits in with the way nature goes.
This is called following two courses at once.
Giles calls this "following two courses at once". The keeper did not have to win the argument, and neither did the monkeys. Both ways were kept open.
If you are caught on the wording of things
The story is short and a little funny, and it is easy to read it as a joke about silly monkeys. The Stanford Encyclopedia of Philosophy reads it more kindly. It takes the keeper as the one to watch. He changes the monkeys' anger to happiness without losing anything at all, and the encyclopedia sees in him the book's values of tolerance and making room for others.
The book does not say the monkeys were foolish to want four in the morning. It says the keeper noticed what mattered to them, and changed the order, not the amount.
The lines after the story rest on a Taoist belief: that opposites belong together, and that there is a natural order, which Giles calls Heaven, that a wise person goes along with. The story itself asks for no belief. It is seven chestnuts a day, either way.