In a 4-digit number, the sum of the first two digit is equal to that of the last two digits. The sum of the first and last digits is equal to the third digit. Finally, the sum of the second and fourth digit is twice the sum of the other two digit. What is the third digit of the number?