output_description: If S is hard to enter, print `Bad`; otherwise, print `Good`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: a, b, c, d = input().split()
  a = int(a)
  b = int(b)
  c = int(c)
  d = int(d)
  n = (b) // c - a // c + b // d - a // d
  f = b // d
  g = a // d
  i = g
  
  while i <= f:
      if (i * d) % c == 0:
          n -= 1
      i += 1
  n = b - a + 1 - n
  print(n)
  
problem_description: Statement
  
  The door of Snuke's laboratory is locked with a security code.
  
  The security code is a 4-digit number. We say the security code is _hard to
  enter_ when it contains two consecutive digits that are the same.
  
  You are given the current security code S. If S is hard to enter, print `Bad`;
  otherwise, print `Good`.
samples: [{"input": "3776", "output": "Bad\n    \n\nThe second and third digits are the same, so 3776 is hard to enter.\n\n* * *"}, {"input": "8080", "output": "Good\n    \n\nThere are no two consecutive digits that are the same, so 8080 is not hard to\nenter.\n\n* * *"}, {"input": "1333", "output": "Bad\n    \n\n* * *"}, {"input": "0024", "output": "Bad"}]