import math A = input() B = [] C = [] counter = 0