public boolean isPowerOfTwo(int n) {
		boolean res = false;
		if (n == 1) {
			return true;
		}else if (n <= 0 || n % 2 == 1) {
			return false;
		} else {
			long st = 2;
			while (st < n) {
				st = st * 2;
			}
//			System.out.println(st);
			if (st == n)
				res = true;
		}
		return res;
	}