public boolean isPalindrome(int x) {
		if (x < 0)
			return false;

		int count = 1;
		while (x / count >= 10) {
			count *= 10;
		}
		while (x > 0) {
			int last = x % 10;
			int first = x / count;
			if (first != last)
				return false;
			x = (x % count) / 10;
			count /= 100;
		}
		return true;
	}