private static int GetDigit(int num, int position) {
		int digit = 0;
		for (int i = 0; i <= position; i++) {
			if (num == 0) {
				return 0;
			}
			digit = num % 10;
			num /= 10;
		}
		return digit;
	}