from random import *

def K():
    x=0
    y=0
    k=0
    while -4<x<4 and -4<y<4:
        a=randint(1,4)
        if a==1:
            x=x-1
        if a==2:
            x=x+1
        if a==3:
            y=y-1
        if a==4:
            y=y+1
        k=k+1
    return k

def Moyenne(n):
    t=0
    for i in range(n):
        t=t+K()
    m=t/n
    return m


