public int getNumber(int[] type)
	{
		Arrays.sort(type);
		int now = 1;
		int[] his = new int[50+1];
		int count = 0;
		for (int i = 0; i < type.length; i++) {
			if (type[i] == now) {
				count++;
			} else if (type[i] == now + 1) {
				his[now] = count;
				count = 1;
				now++;
			} else {
				break;
			}
		}
		//last
		his[now] = count;
		
		int sum = 0;
		int mul = 1;
		for (int i = 1; i < his.length; i++) {
			mul = his[i] * mul;
			sum += mul;
		}
		return sum;
	}