Fat Brother loves playing games with number, such like “Calculating 24”, “Sudoku” and so on. Now consider about a special game called “Eleven”. In this game, Fat Brother has to write down an integer without leading zero by using each of the digits certain times and his goal is to make this number can be divided by 11. For example, given one digit 1 and two digits 6, Fat Brother can write integer 616 since this integer can be divided by 11. Also this is the only integer you can write by using these digits.
Now Fat Brother gets some digits in a game. Your task is to help him determined how many different integer he can write to fulfill the requirement.