def gcd(a,b):
        global j
        j=j+1
        """ the euclidean algorithm """
        if b == 0:
                return a
        else:
                return gcd(b, (a%b))
x=input("type in x\n")
y=input("type in y\n")
j=0
print "the gcd is",gcd(x,y)
print "the function was called", j," times"
