#!/usr/local/bin/python2
class M(type):
  def __new__(cls, name, bases, attrs):
    cls.n = 0
    return type.__new__(cls, name, bases, attrs)

  def __init__(self, name, bases, attrs):
    self.i = 1
    self.d()

  def d(self):
    print self.i

class C(object):
  __metaclass__ = M

print M.n