Buggy python submission (verdict: Runtime Error):
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  cycle = [1]*a +  [0]*b
  if extra != 0:
   result += sum(cycle[:extra]) 
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  cycle = [1]*a +  [0]*b
  result += sum(cycle[:extra]) 
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Runtime Error):
8 3 4

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  cycle = [1]*a +  [0]*b
  result += sum(cycle[:extra]) 
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  cycle = [1]*a +  [0]*b
  if extra != 0:
    result += sum(cycle[:extra]) 
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = list(map(int, input().split()))
roop = n // (a +b)
extra = n - roop*(a+b)
result = a*roop
cycle = [1]*a +  [0]*b
if extra != 0:
  result += sum(cycle[:extra]) 
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Runtime Error):
n, a, b = list(map(int, input().split()))
roop = n // (a +b)
extra = n - roop*(a+b)
print(extra)
result = a*roop
cycle = [1]*a +  [0]*b
if extra != 0:
  result += sum(cycle[:extra]) 
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = list(map(int, input().split()))
extra = n % (a +b)
roop = n // (a +b)
result = a*roop
cycle = [1 for _ in range(a)] +  [0 for _ in range(b)]
if extra != 0:
  for i in range(extra):
    result += cycle[i]
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = list(map(int, input().split()))
extra = n % (a +b)
roop = n // (a +b)
result = a*roop
cycle = [1 for _ in range(a)] +  [0 for _ in range(b)]
if extra != 0:
  for i in range(extra):
    result += cycle[i]
print(result)

Fixed submission:
n, a, b = list(map(int, input().split()))
result = 0
if a + b != 0:
  roop = n // (a +b)
  extra = n - roop*(a+b)
  result = a*roop
  if extra >= a:
    result += a
  else:
    result += extra
print(result)