int getNorthTweak(int cellId) {
        int row = getRow(cellId);
        int positionInRow = getPositionInRow(cellId);
        if ((row <= 0) || (row >= 5*n)) {
            return 0;
        } else if (row == n - 1) {
            return getSegmentNumber(cellId) / 2;
        } else if ((row == 2*n - 1) && (n != 1)) {
            return 0;
        } else if (row == 3*n) {
            return (2*positionInRow + 3*n + 1) / (6*n);
        } else if (row == 4*n) {
            return positionInRow / n;
        }
        return getSegmentNumber(cellId);
    }