Statistical mechanics of money