public static void main(String[] args) {
        // TODO code application logic here
        BigInteger TwoInThouthand, Two;
        String TwoInTh;
        int a = 2;
        int sum = 0;
        int Thouthand = 1000;
        Two = BigInteger.valueOf(a);
        TwoInThouthand = Two.pow(Thouthand);
        TwoInTh = TwoInThouthand.toString();
        char[] TIT = TwoInTh.toCharArray();
        for (int i = 0; i < TIT.length; i++) {
            sum += TIT[i] - 48;
        }
        System.out.println(sum);
    }