On the faces of a cube several positive integer numbers are written. On every edge the sum of the numbers of it's two faces is written, and in every vertex the sum of numbers on the three faces that have this vertex. It turned out that all the written numbers are different. Find the smallest possible amount of the sum of all written numbers.