static int cycleLength(int a){
		LinkedList<Integer> list = new LinkedList<Integer>();
		Integer [] arr=null;
		
		
		while(a>1){
			if(a%2==0){
				a=a/2;
				list.add(new Integer(a));
			}else{
				a=3*a+1;
				list.add(new Integer(a));
			}
			
			
		}
		/*Collections.sort(list, new Comparator<Integer>() {
	         @Override
	         public int compare(Integer o1, Integer o2) {
	             return Collator.getInstance().compare(o1, o2);
	         }
	     });*/
		
		//System.out.println();		
		//Collections.sort(list);
		//System.out.println("Sorted List is: "+list.get((list.size()-1)));
		return list.size()+1;		
		
	}