# TwoCompleteSets-q1
# Section 40, Q.1, p.144, p.268
# input: 6

import random

n = int(input("n=? "))
x = [0]*(n+1)
spins = 0
for count in range(1,2*n):
  while True:
    r = random.randint(1,n)
    spins += 1
    if x[r] <= 1:
      break
  x[r] += 1
print("spins ==", spins)
