A and B are friends at a summer school. When B asks A for his address, he answers: "My house is on XYZ street, and my house number is a 3-digit number with distinct digits, and if you permute its digits, you will have other 5 numbers. The interesting thing is that the sum of these 5 numbers is exactly 2017. That's all.". After a while, B can determine A's house number. And you, can you find his house number?