output_description: Print the area of this yard excluding the roads (in square yards).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B
attempt: import sys
  
  N = float(input())
  t = 3
  prime_number = []
  while t <= N / 15.0:
      l = []
      for i in range(t + 1):
          if i != 0:
              if t % i == 0:
                  l.append(i)
      if l == [1, t]:
          prime_number.append(t)
      t += 1
  n = len(prime_number)
  ans = 0
  if n < 3:
      print(0)
      sys.exit()
  else:
      for i in prime_number:
          for j in prime_number:
              if j != i:
                  for k in prime_number:
                      if k != i and k != j:
                          if i * j * k <= N:
                              ans += 1
  ans = ans / 6
  if N >= 189:
      ans += 2
  elif N >= 135:
      ans += 1
  print(int(ans))
  
problem_description: Statement
  
  There is a farm whose length and width are A yard and B yard, respectively. A
  farmer, John, made a vertical road and a horizontal road inside the farm from
  one border to another, as shown below: (The gray part represents the roads.)
  
  ![ ](https://img.atcoder.jp/ghi/27d063746b460f1132b6a99aa535a562.png)
  
  What is the area of this yard excluding the roads? Find it.
samples: [{"input": "2 2", "output": "1\n    \n\nIn this case, the area is 1 square yard.\n\n* * *"}, {"input": "5 7", "output": "24\n    \n\nIn this case, the area is 24 square yards."}]