Result [link]

AC

Code [DL]

    		  	  
    	
 
			     
    	 
 
			 
  	 	 
    	 
			    	 
	  
    
	
	     
			    		    
	  		       	 
 
			     	
			    	
	  	 
     	
 
			     
 
		  	
			 	 
    	 
				
 	


stdin

0100010101000010111110111100011110110011011011101010110010000101110010000011001101001010011001000010

stdout

342967100473377719800105838146

stderr