Harryxun/stf_run huggingface dataset:
n,a,b = map(int,input().split())
s = 'b'*a + 'r'*b
if a+b == 0:
  print(0)
  
else:  

  d = n//(a+b)
  q = n % (a+b)

  
  if q <= a:
    print(a*d+q)
  else:
    print(a*d+a)



### FIXED CODE ###

n,a,b = map(int,input().split())

if a+b == 0:
  print(0)
  
else:  

  d = n//(a+b)
  q = n % (a+b)

  
  if q <= a:
    print(a*d+q)
  else:
    print(a*d+a)
XY = input()
X = int,(XY.split([0]))
Y = int,(XY.split([1]))

for i in range(X + 1):
  if 2 * i + 4 * (X - i) == Y:
    print("Yes")
  else:
    print("No")
    

### FIXED CODE ###

XY = input()
xy = list(map(int, XY.split()))

x = xy[0]
y = xy[1]

exist = False
for i in range(x + 1):
  if 2 * i + 4 * (x - i) == y:
    exist = True
    break
    
if exist:
  print("Yes")
else:
  print("No")
a, b, k = inpm()
ta = a - k
ao = b
if(ta < 0):
    ao = b - ta
    ta = 0
if(ao < 0):
    ao = 0
print(str(ta) + ' ' + str(ao))


### FIXED CODE ###

import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b, k = inpm()
ta = a - k
ao = b
if(ta < 0):
    ao = b + ta
    ta = 0
if(ao < 0):
    ao = 0
print(str(ta) + ' ' + str(ao))
s = list(input())
t = list(input())

a = [chr(i + ord("a")) for i in range(26)]
b = []

for i in range(len(s)):
    if s[i] != t[i]:
        c1 = s[i]
        c2 = t[i]
        if c2 not in a:
            for j in range(len(b)):
                if b[j][1] == c2 and b[j][0] != c1:
                    print("No")
                    exit()
        a.remove(c2)
        b.append([c1, c2])
else:
    print("Yes")

### FIXED CODE ###

S = input()
T = input()

converter = dict()

for s, t in zip(S, T):
    if converter.get(s) is not None:
        if converter[s] != t:
            print("No")
            break
    else:
        converter[s] = t
else:
    if len(converter.values()) != len(set(converter.values())):
        print("No")
    else:
        print("Yes")
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))

whole = a.sum()
div = np.abs(a.cumsum() - whole / 2).argmin()

if div == 0 or div == (n - 1):
    print(min(np.abs(a[0] - a[1:].sum()), np.abs(a[:-1].sum() - a[-1])))
else:
    print(np.abs(a[:div + 1].sum() - a[div + 1:].sum()))

### FIXED CODE ###

a, b = map(int, input().split())
print("Possible" if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0 else "Impossible")
S  =  入力（''）

もし S  ==  STR（'SUN' ）：
    プリント（7）
elif  S  ==  str（'MON'）：
    印刷（6）
elif  S  ==  str（'TUE'）：
    プリント（5）
elif  S  ==  str（'WED'）：
    プリント（4）
elif  S  ==  str（'THU'）：
    プリント（3）
elif  S  ==  str（'FRI'）：
    印刷（2）
その他：
    印刷（1）

### FIXED CODE ###

S  =  input()

if S  ==  'SUN' :
    print(7)
elif  S  ==  'MON':
    print(6)
elif  S  ==  'TUE':
    print(5)
elif  S  ==  'WED':
    print(4)
elif  S  ==  'THU':
    print(3)
elif  S  ==  'FRI':
    print(2)
elif  S  ==  'SAT':
    print(1)
a,b,x=map(int,input().split())
first=a-a%x+x
if(first==a+x):
  first=a
last=b-b%x

print(last//x - first//x +1

### FIXED CODE ###

a,b,x=map(int,input().split())
first=a-a%x+x
if(first==a+x):
  first=a
last=b-b%x

print(last//x - first//x +1)
n,m = map(int, input().split())

A = [input() for i in range(n)]
B = [input() for j in range(m)]

for i in range(n-m+1):
  for j in range(n-m+1):
    if A[i][j:j+m] == B[0]:
      if all(A[i+k][j:j+m] == B[k] for k in range(1,M)):
        print("Yes")
        exit()
print("No")


### FIXED CODE ###

n,m = map(int, input().split())

A = [input() for i in range(n)]
B = [input() for j in range(m)]

for i in range(n-m+1):
  for j in range(n-m+1):
    if A[i][j:j+m] == B[0]:
      if all(A[i+k][j:j+m] == B[k] for k in range(1,m)):
        print("Yes")
        exit()
print("No")
a = int(input())
b = int(input())
c = int(input())
d = int(input())

print(min(a,b) + min(c+d))

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())

print(min(a,b) + min(c,d))
from collections import deque

h,w = map(int,input().split())
ch, cw = map(int,input().split())
dh, dw = map(int,input().split())

G = []
for i in range(h):
    G.append(list(input()))

queue = deque([ch-1, cw-1])
S = [[float("inf")]*w for _ in range(h)]
S[ch-1][cw-1] = 0

while queue:
    y, x = queue.popleft()
    for i in range(-1, 2):
        for j in range(-1, 2):
            if i != 0 and j != 0:
                if 0 <= x+i < h and 0 <= y < w:
                    if S[y+j][x+i] > S[y][x] and G[y+j][x+i] == ".":
                        S[y+j][x+i] = S[y][x]
                        queue.appendleft((y+j, x+i))

    for i in range(-2, 3):
        for j in range(-2, 3):
            if i != 0 and j != 0:
                if 0 <= x+i < h and 0 <= y < w:
                    if S[y+j][x+i] > S[y][x] and G[y+j][x+i] == ".":
                        S[y+j][x+i] = S[y][x] + 1
                        queue.appendleft((y+j, x+i))


if S[dh+1][dw+1] == float("inf"):
    print(-1)
else:
    print(S[dh-1][dw-1])


### FIXED CODE ###

from collections import deque


h, w = map(int,input().split())
ch, cw = map(lambda x: int(x) - 1, input().split())
dh, dw = map(lambda x: int(x) - 1, input().split())

G = []
for i in range(h):
    G.append(list(input()))

queue = deque([(ch, cw)])
S = [[float("inf")]*w for _ in range(h)]
S[ch][cw] = 0

while queue:
    y, x = queue.popleft()
    dx_dy = ((1,0),(0,1),(-1,0),(0,-1))
    ans = S[y][x]

    if (y, x) == (dh, dw):
            S[y][x] = ans
            break

    for j, i in dx_dy:
        if 0 <= x+i < w and 0 <= y+j < h and S[y+j][x+i] > ans and G[y+j][x+i] == ".":
            queue.appendleft((y+j, x+i))
            S[y+j][x+i] = ans
            

    ans += 1
    for i in range(-2, 3):
        for j in range(-2, 3):
            if 0 <= x+i < w and 0 <= y+j < h and S[y+j][x+i] > ans and G[y+j][x+i] == ".":
                S[y+j][x+i] = ans
                queue.append((y+j, x+i))


if S[dh][dw] == float("inf"):
    print(-1)
else:
    print(S[dh][dw])
from collections import deque


def bfs(S):  # 幅優先探索  # キュー
    dist = [[-1] * w for _ in range(h)]  # 前処理
    que, frag = deque(), set()
    for i, Si in enumerate(S):
        for j, Sij in enumerate(Si):
            if Sij == '#':
                dist[i][j] = 0
                que.append((i, j)), frag.add((i, j))

    while len(que) > 0:
        (x, y) = que.popleft()
        near = [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)]
        for i, j in near:  # 移動先の候補
            if (i, j) in frag:  # 処理済みか否か
                continue
            if 0 <= i < h and 0 <= j < w:
                dist[i][j] = dist[x][y] + 1
                que.append((i, j)), frag.add((i, j))
    return dist


h, w = map(int, input().split())
a = [input() for _ in range(h)]
ans = bfs(a)
print(max(max(ansi) for ansi in ans)


### FIXED CODE ###

from collections import deque


def bfs(S):  # 幅優先探索  # キュー
    dist = [[-1] * w for _ in range(h)]  # 前処理
    que = deque()
    for i, Si in enumerate(S):
        for j, Sij in enumerate(Si):
            if Sij == '#':
                dist[i][j] = 0
                que.append((i, j))

    while len(que) > 0:
        (x, y) = que.popleft()
        near = [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)]
        for i, j in near:  # 移動先の候補
            if 0 <= i < h and 0 <= j < w and dist[i][j] < 0:
                dist[i][j] = dist[x][y] + 1
                que.append((i, j))
    return dist[x][y]


h, w = map(int, input().split())
a = [input() for _ in range(h)]
print(bfs(a))
a = int(input())
b = int(input())
c = int(input())
x = int(input())
 
 result= 0
 
for ai in range(a+1):
    for bi in range(b+1):
        for ci in range(c+1):
            amount = 500 * ai + 100 * bi + 50 * ci
            if amount == x:
                result += 1
 
print(result)

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
x=int(input())
x=int(x/50)
p=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 10*i + 2*j + k == x:
                p=p+1


print(p)
#%%
n = int(input())

x = int(n**0.5)
x += 1
for i in range(x, 1, -1):
    if n%i == 0:
        a = i
        b = n//i
        break
#print(a, b)

print(a+b-2)

### FIXED CODE ###

#%%
n = int(input())
a = 10**15


x = int(n**0.5)
x += 1
for i in range(x, 1, -1):
    if n%i == 0:
        a = i
        b = n//i
        break
#print(a, b)

if a == 10**15:
    print(n-1)
else:
    print(a+b-2)
a, b = input().split()
l = [str(a) * int(b), str(b) * int(a)].sort()
print(l[0])

### FIXED CODE ###

a, b = input().split()
l = [str(a) * int(b), str(b) * int(a)]
l.sort()
print(l[0])
ef main():
    from collections import Counter
    n = int(input())
    As = list(map(int,input().split(" ")))
    
    cnts = Counter()
    dp = [0]*n
    for i in range(1,n):
        dp[i] =dp[i-1] + cnts.get(i-As[i],0)
        cnts[As[i]+i]+=1
    print(dp[n-1])
main()

### FIXED CODE ###

def main():
    from collections import Counter
    n = int(input())
    As = list(map(int,input().split(" ")))
    
    cnts = Counter()
    dp = [0]*n
    cnts[As[0]+1]+=1
    for i in range(1,n):
        dp[i] =dp[i-1] + cnts.get(i+1-As[i],0)
        cnts[As[i]+i+1]+=1
    print(dp[n-1])
main()
h,w=map(int,input().split())
lst=list(input() for i in range(h))
n_h=h
for i in range(len(lst)):
    if "#" not in lst[h-i-1]:
        n_h-=1
        lst.pop(h-i-1)
lst=list(map(list,lst))
for i in range(w):
    T=True
    for b in range(n_h):
        if lst[b][w-i-1]=="#":
            T=False
            break
    if T:
        for b in range(h):
            lst[b].pop(w-i-1)
for a in lst:
    print("".join(a))

### FIXED CODE ###

N,i=map(int,input().split())
print(N-i+1)
a, b=map(int, input().split())
if a==0 or b==0:
  print("Zero")
  exit()
if(a=<0 and b>=0):
  print("Zero")
  exit()
if a>0:
  print("Positive")
elif abs(b-a)%2==0:
  print("Negative")
else:
  print("Positive")
  
 

### FIXED CODE ###

a, b=map(int, input().split())
if a==0 or b==0:
  print("Zero")
  exit()
if(a<=0 and b>=0):
  print("Zero")
  exit()
if a>0:
  print("Positive")
elif abs(b-a)%2==0:
  print("Negative")
else:
  print("Positive")
N = int(input())

L = []
for i in range(N):
  P = int(input())
  L.append(P)

F = 0

for i in range(1, N):
  P = L[i]
  for j in range(0, i):
    if L[j] < L[i]:
      F = 0
      break
    else:
      F = 1
      
  if F = 1:
    A += 1
    
print(A)
    
      


      

### FIXED CODE ###

N = int(input())
d = list(map(int, input().split()))

c = 1
a = d[0]

for i in range(1,N):
  if d[i] <= a:
    c += 1
    a = d[i]

print(c)
n = int(input
A = [0] + list(map(int, input().split())) + [0]

#普通に総和を出す
sum = 0
for i, a in enumerate(A):
  if i == n+1: break #n+1はゴールなので先に行かない
  sum += abs(a - A[i+1]) #a:A[i]
  
#引いて足す
for i in range(1, n+1, 1): #1～Nを省いたとき
  nowsum = sum
  nowsum -= abs(A[i-1]-A[i])
  nowsum -= abs(A[i]-A[i+1])
  nowsum += abs(A[i-1]-A[i+1])
  print(nowsum)


### FIXED CODE ###

n = int(input())
tmpa = list(map(int, input().split()))
A = [0] * (n+2)
A[0] = 0
A[n+1] = 0
for i in range(1,n+1,1): A[i] = tmpa[i-1]


#普通に総和を出す
sum = 0
for i, a in enumerate(A):
  if i == n+1: break #n+1はゴールなので先に行かない
  sum += abs(a - A[i+1]) #a:A[i]
  
#引いて足す
for i in range(1, n+1, 1): #1～Nを省いたとき
  nowsum = sum
  nowsum -= abs(A[i-1]-A[i])
  nowsum -= abs(A[i]-A[i+1])
  nowsum += abs(A[i-1]-A[i+1])
  print(nowsum)
while True:
    a, b = raw_input().strip().split(" ")
    print len(str(int(a) + int(b))))

### FIXED CODE ###

#condig: UTF-8
 
while True:
    try:
        n = map(int, raw_input().split())
        s = len(str(n[0] + n[1]))
        print s
    except Exception:
        break
#16D8101014F 久留米 竜之介 Python
from collections import deque

n,time=map(int,input().split())
timenow = 0
p=[]
q=[]
queue=[] #p1,p2....
Queue=[] #time
for i in range (n):
	line=input().split()
	q.append(int(line.pop()))
	p.append(line.pop())

print(len(p))
while len(p) is not 0:
	Ptmp=p.deque()
	if Ptmp<=100:
		timenow+=Ptmp
		queue.append(q.deque())
		Queue.append()
	else:
		timenow+=100
		Ptmp-=100
		q.append(ptmp)
		p.append(p.deque())#??
		
print(queue,Queue)
		
		


### FIXED CODE ###

#16D8101014F 久留米 竜之介 Kurume Ryunosuke Python
All = 0
q = []
Queue = []
tmp,time = map(int,input().split())
for i in range(tmp):
    p,zi =input().split()
    q.append([p,int(zi)])
while len(q) > 0:
    if q[0][1]<= time:
        All+=q[0][1]
        v=q.pop(0)
        Queue.append([v[0],All])
    else:
        All+=time
        q[0][1]-=time
        last=q.pop(0)
        q.append(last)
for i in range(len(Queue)):
    print("{0} {1}".format(Queue[i][0],Queue[i][1]))
S = input()
Q = int(input())
 
for i in range(Q):
    q = list(input().split())
 
    if (len(q) == 1):
        S = S[::-1]
    else:
        judge = q[1]
        cha = q[2]
        
        if (int(judge) == 1):
            S = cha + S
        else:
            S = S + cha
 
print(S)
 

### FIXED CODE ###

from collections import deque

S = deque(input())
Q = int(input())
reverse = 1


for i in range(Q):
    
    q = input()
    
    if (q == '1'):
        reverse *= -1
    else:
        integer, judge, cha = q.split()
        
        if (judge == '1'):
            if (reverse == 1):
                S.appendleft(cha)
            else:
                S.append(cha)
        
        elif (judge == '2'):
            if (reverse == 1):
                S.append(cha)
            else:
                S.appendleft(cha)

if (reverse == -1):
    S.reverse()

print(''.join(list(S)))
n = int(input())
sn = {}
for i in range(n):
    s = "".join(sorted(input()))
    if not(s in sn):
        sn[s] = 0
    else:
        sn[s] += 1
        
def sigma(c):
    if c == 1:
        return 1
    elif c == 0:
        return 0
    else:
        return c + sigma(c-1)
      
count = 0
for v in sn.values():
    count += sigma(v)
print(count)

### FIXED CODE ###

def main():
    n = int(input())
    array_s = []
    array = []
    for i in range(n):
        array_s.append(input())
 
    for s in array_s:
        array.append(''.join(sorted(s)))
    array = sorted(array)
    ans = 0
    count = 1
    for i in range(n-1):
        if array[i] == array[i+1]:
            count += 1
            if i != n-2:
                continue
        ans += int(count*(count-1)/2)
        count = 1
    print(ans)
 
 
if __name__ == '__main__':
    main()
X, N = map(int, input().split())
p = list(map(int, input().split()))


l = [0]*N

for i in range(N):
  l[abs(p[i] - X)] += 1

for i in range(N):
  if i == 0:
    if l[0] == 1:
      continue
    else:
      print(X)
  else:
    if l[i] == 0:
      print(X-i)
      break
    elif l[i] == 1:
      try:
        p_index = p.index(x-i)
        print(X-i)
      except:
        print(X+i)
      break

### FIXED CODE ###

X, N = map(int, input().split())
try:
  p = list(map(int, input().split()))
except:
  p = []


l = [0]*200

for i in range(N):
  l[abs(p[i] - X)] += 1

#print(p.index(9))

if N == 0:
  print(X)
else:
  for i in range(N+1):
    if i == 0:
      if l[0] == 1:
        continue
      else:
        print(X)
        break
    else:
      if l[i] == 0:
        print(X-i)
        break
      elif l[i] == 1:
        try:
          p_index = p.index(X-i)
          print(X+i)
        except:
          print(X-i)
        break
a = input().split()
if a[0] == D and a[1] == D:
    print(H)
elif a[0] == H and a[1] == H:
    print(H)
else:
    print(D)

### FIXED CODE ###

a,b = map(str,input().split())
if a == 'D' and b == 'D':
    print('H')
elif a == 'H' and b == 'H':
    print('H')
else:
    print('D')
n = int(input())

dic = {}
for i in range(n):
    string = input()
    sortStr = "".join(sorted(string))
    if sortStr in dic:
        dic[sortStr] += 1
    else:
        dic[sortStr] = 1

sum = 0
for num in dic.values():
    if num == 1:
        sum += 0
    else:
        sum += math.factorial(num) / 2
print(math.floor(sum))

### FIXED CODE ###

import math
n = int(input())

dic = {}


def twoKimuawaseSum(num):
    result = 0
    for i in range(1, num):
        result += i
    return result


for i in range(n):
    string = input()
    sortStr = "".join(sorted(string))
    if sortStr in dic:
        dic[sortStr] += 1
    else:
        dic[sortStr] = 1
sum = 0
for num in dic.values():
    if num == 1:
        sum += 0
    else:
        sum += twoKimuawaseSum(num)
print(math.floor(sum))
n= input()

n_list=list(n)

a=(n_list.count(n_list[0]))
b=(n_list.count(n_list[1]))
c=(n_list.count(n_list[2]))
d=(n_list.count(n_list[3]))
print(a,b,c,d)
if (a==3 and c==and b==2 and d==2):
    print("Yes")
else:
    print("No") 

### FIXED CODE ###

n= input()

n_list=list(n)

a=(n_list.count(n_list[0]))
b=(n_list.count(n_list[1]))
c=(n_list.count(n_list[2]))
d=(n_list.count(n_list[3]))

if a==2:
    if b==2:
        if c==2:
            if d==2:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
n,a,b,c = map(int,input().split())
l = [int(input()) for _ in range(n)]
ans = 10000
for i in range(2 ** (2*n)):
  v = [0,0,0,0]
  assign = [(i>>(2*j)) & 3 for j in range(n)]
  cost = 0
  for j in range(n):
    is v[assign[j]] > 0:
      cost += 10
    v[assign[j]] += l[j]
  if v[1] == 0 or v[2] == 0 or v[3] == 0:
    continue
  ans = min(ans, cost + abs(v[1]-a) + abs(v[2]-b) + abs(v[3]-c))
print(ans)

### FIXED CODE ###

n,a,b,c = map(int,input().split())
l = [int(input()) for _ in range(n)]
ans = 10000
for i in range(2 ** (2*n)):
  v = [0,0,0,0]
  assign = [(i>>(2*j)) & 3 for j in range(n)]
  cost = 0
  for j in range(n):
    if assign[j] > 0 and v[assign[j]] > 0:
      cost += 10
    v[assign[j]] += l[j]
  if v[1] == 0 or v[2] == 0 or v[3] == 0:
    continue
  ans = min(ans, cost + abs(v[1]-a) + abs(v[2]-b) + abs(v[3]-c))
print(ans)
a, b, k = map(int, input().split())
n = list(range(a, b+1))
for i in n:
  if i in n[:k] + n[-k:]:
    print(i)

### FIXED CODE ###

a, b, k = map(int, input().split())
n = range(a, b+1)
for i in sorted(set(n[:k]) | set(n[-k:])):
  print(i)
#coding: utf-8
from collections import defaultdict

N = int(input())
G = {}
for i in range(1, N+1):
    G[i] = []

for i in range(N-1):
    u, v, w = (int(n) for n in input().split())
    G[u].append((v, w))
    G[v].append((u, w))

ret = [-1] * (N)

def dfs(node, d):
    if ret[node-1] != -1:
        return

    if d % 2 == 0:
        ret[node-1] = 0
    else:
        ret[node-1] = 1 

    for next_node in G[node]:
        dfs(next_node[0], d + next_node[1])

dfs(1, 0)
for i in range(N):
    print(ret[i])


### FIXED CODE ###

#coding: utf-8
from collections import defaultdict, deque

N = int(input())
G = {}
for i in range(1, N+1):
    G[i] = []

for i in range(N-1):
    u, v, w = (int(n) for n in input().split())
    G[u].append((v, w))
    G[v].append((u, w))

ret = [-1] * (N+1)

que = deque()
que.append((1, 0))

while len(que) > 0:
    node, distance = que[0]
    que.popleft()

    ret[node] = distance % 2
    for next_node, next_distance in G[node]:
        if ret[next_node] == -1:
            que.append((next_node, distance + next_distance))

for i in range(N):
    print(ret[i+1])
a = list(map(int,input().split()))
x=len(a)
i=0
for k in range 1000000000:
    i=i+1
    for i in range x:
        a[i]=0.5*a[i]
        if a[i]%2=1:
            break
    else:
        continue
    break
h=i-1
print("h")



### FIXED CODE ###

s=input()
a = list(map(int,input().split()))
x=len(a)
f=0
for k in range(1000000000):
    f=f+1
    for i in range(x):
        if a[i]%2 == 1:
            break
        a[i]=0.5*a[i]
    else:
        continue
    break
print(f-1)
a = int(input())
b = int(input())

if (a == 1 and b == 2) or (a == 2 and b == 1) :
  print(3)
elif (a == 2 and b == 3) or (a == 3 or b == 2) :
  print(1)
else:
  pritn(2)

### FIXED CODE ###

a = int(input())
b = int(input())

if (a == 1 and b == 2) or (a == 2 and b == 1) :
  print(3)
elif (a == 2 and b == 3) or (a == 3 and b == 2) :
  print(1)
elif (a == 1 and b == 3) or (a == 3 and b == 1) :
  print(2)
n=int(input())
t=0
for i in range(n):
  x,y=input().split()
  if y=='JPN':
    t+=x
  else:
    t+=x*380000
print(t)

### FIXED CODE ###

n=int(input())
t=0
c=0
for i in range(n):
  x,y=input().split()
  if y=='JPY':
    t+=int(x)
  else:
    c+=float(x)
print(t+c*380000)
import sys
from collections import defaultdict
from functools import lru_cache


g = None


@lru_cache(maxsize=100000)
def f(x):
    return max((f(y) + 1 for y in g[x]), default=0)


def resolve(in_):
    global g
    n, m = map(int, next(in_).split())
    _g = defaultdict(list)
    for line in in_:
        x, y = map(int, line.split())
        _g[x - 1].append(y - 1)
    g = _g
    return max(f(i) for i in range(n))


def main():
    sys.setrecursionlimit(100000)
    ans = resolve(sys.stdin.buffer)
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from collections import defaultdict


g = None
memo = None


def f(x):
    if memo[x] == -1:
        ret = 0
        for y in g[x]:
            ret = max(ret, f(y) + 1)
        memo[x] = ret
    return memo[x]


def resolve(in_):
    global g, memo
    n, m = map(int, next(in_).split())
    _g = defaultdict(list)
    for line in in_:
        x, y = map(int, line.split())
        _g[x - 1].append(y - 1)
    g = _g
    memo = [-1] * 100000
    return max(f(i) for i in range(n))


def main():
    sys.setrecursionlimit(1000000)
    ans = resolve(sys.stdin.buffer)
    print(ans)


if __name__ == '__main__':
    main()
a = input().split("¥n")[1]
print(a.count("ABC"))

### FIXED CODE ###

a = input()
a = input()
print(a.count("ABC"))
L,N=map(int,input().split())
l=list()
for i in range(N):
  S=input()
  l.append(S)
ll=sorted(l)
print(''.join(ll))

### FIXED CODE ###

N,L=map(int,input().split())
l=list()
for i in range(N):
  S=input()
  l.append(S)
ll=sorted(l)
print(''.join(ll))
MOD = int(1e9 + 7)
N = int(1e5)
M = 13

s = input()
dp = [[0 for x in range(M)] for x in range(N)]
dp[0][0] = 1

for i in range(len(s)):
    for j in range(M):
        for k in range(10):
            if s[i] == "?" or s[i] == str(k):
                dp[i+1][(j*10 +k) % M] += dp[i][j]
                dp[i+1][(j*10 +k) % M] %= MOD


print(dp[len(s)][5])


### FIXED CODE ###

MOD = int(1e9 + 7)
N = int(1e5)
M = 13

s = input()
dp = [[0 for x in range(M)] for x in range(N+10)]
dp[0][0] = 1

for i in range(len(s)):
    for j in range(M):
        for k in range(10):
            if s[i] == "?" or s[i] == str(k):
                dp[i+1][(j*10 +k) % M] += dp[i][j]
                dp[i+1][(j*10 +k) % M] %= MOD


print(dp[len(s)][5])
n,m=map(int,input().split())
l=[]
for i in range(m):
    a,b=map(int,input().split())
    l.append(a)
    l.append(b)

z=list(set(l))
for i in range(1,n+1):
    print(l.count(z[i]))

### FIXED CODE ###

n,m=map(int,input().split())
x=[]

for i in range(m):
    a,b=map(int,input().split())
    x.append(a)
    x.append(b)


for j in range(1,n+1):
    print(x.count(j))
n = int(input())
s = list(input())

cnt = 0
for i in range(n):
  for j in range(i+1, n):
    for k in range(j+1, n):
      if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
        if j-i != k-j:
          cnt += 1
print(cnt)


### FIXED CODE ###

n = list(map(int, input()))

ans = 'No'
for i in range(len(n)):
  if n[i] == 7:
    ans = 'Yes'
    
print(ans)