Iahub likes chess very much. He even invented a new chess piece named Coder. A Coder can move (and attack) one square horizontally or vertically. More precisely, if the Coder is located at position (x, y), he can move to (or attack) positions (x + 1, y), (x–1, y), (x, y + 1) and (x, y–1).

Iahub wants to know how many Coders can be placed on an n × n chessboard, so that no Coder attacks any other Coder.

Input

The first line contains an integer n (1 ≤ n ≤ 1000).

Output

On the first line print an integer, the maximum number of Coders that can be placed on the chessboard.

On each of the next n lines print n characters, describing the configuration of the Coders. For an empty cell print an '.', and for a Coder print a 'C'.

If there are multiple correct answers, you can print any.

Examples

Input

2


Output

2
C.
.C
#!/usr/bin/env python3
def read_string():
    return input()

def read_strings(return_type = iter, split = None, skip = 0):
    return return_type(input().split(split)[skip:])

def read_lines(height, return_type = iter):
    return return_type(read_string() for i in range(height))

def read_number():
    return int(input())

def read_numbers(return_type = iter, skip = 0):
    return return_type(int(i) for i in input().split()[skip:])

def read_values(*types, array = None):
    line = input().split()
    result = []
    for return_type, i in zip(types, range(len(types))):
        result.append(return_type(line[i]))
    if array != None:
        array_type, array_contained = array
        result.append(array_type(array_contained(i) for i in line[len(types):]))
    return result

def read_array(item_type = int, return_type = iter, skip = 0):
    return return_type(item_type(i) for i in input().split()[skip:])

def read_martix(height, **args):
    return_type = args["return_type"] if "return_type" in args else iter
    return_type_inner = args["return_type_inner"] if "return_type_inner" in args else return_type
    return_type_outer = args["return_type_outer"] if "return_type_outer" in args else return_type
    item_type = args["item_type"] if "item_type" in args else int
    return return_type_outer(read_array(item_type = item_type, return_type = return_type_inner) for i in range(height))

def read_martix_linear(width, skip = 0, item_type = int, skiped = None):
    num = read_array(item_type = item_type, skip = skip)
    height = len(num) / width
    return [num[i * width: (i + 1) * width] for i in range(height)]

def main():
    n = read_number()
    print((n * n + 1) // 2)
    for i in range(n):
        if i % 2 == 0:
            print(("C." * n)[0:n])
        else:
            print((".C" * n)[0:n])

if __name__ == '__main__':
    main()
