public static void main ( String [] args ) {

	BigInteger a = new BigInteger("2");
	BigInteger b = new BigInteger("2");
	
	for ( int i=1; i<1000; i++ ) {
	    a = a.multiply(b);
	}

	String ss = a.toString();
	int res = 0;
	for ( int i=0; i<ss.length(); i++ ) {
	    res = res + Integer.parseInt(ss.substring(i,i+1));
	}

	System.out.println("sum = " + res);

    }