Story Version (scroll for TL;DR)
It's the end of the first quarter of 2017.
This means it's the end of the 2016 fiscal year (at least in my country it is).
It's time to draw the line.
So the CEO did his calculations and said we did a good job so we should get a bonus.
But there is a catch. Or two.
The CEO values smart people more than hard working people.
So here is his bonus scheme straight from the CEO's mouth.
You all know your own monthly salary but not those of your colleagues.
If you can guess how much it costs me to pay all of you in one month you get a bonus. Otherwise I'll just take you out for beers, but no bonus.
You cannot ask the financial department. And you cannot find out how much the other people make a month.
Now what strategy should we apply in order to know the total sum of the salaries per month?
I really want the bonus.
All I can tell you is that we are at least 3 employees and you can ignore the tax calculations.
Note: This is just a story. It didn't actually happen... because there are no bonuses.
Each of N people know a number but don't know the number the others know.
How can the people find the sum of those numbers without finding out each other number? N >= 3