public int solutionFor(int[] A) {
        if (A.length == 0) return 0;
        // write your code in Java SE 8
        int[] dp = new int[A.length];
        dp[0] = A[0];
        for (int i = 1; i < A.length; i++) {
            int max = Integer.MIN_VALUE;
            for (int j = 1; j <= 6; j++) {
                if (i - j >= 0) {
                    max = Math.max(max, dp[i -j]);
                }
            }
            dp[i] = A[i] + max;
        }
        return dp[A.length - 1];
    }