public class PangkatDua {
    public int pangkatDua(int x) {
        var result = BigInteger.TWO.pow(x);
        var str = result.toString();
        var answer = 0;

        for (var c :
                str.toCharArray()) {
            answer += Integer.parseInt(Character.toString(c));
        }

        return answer;
    }
}