Harryxun/stf_run huggingface dataset:
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x > w_p:
  theta = math.degrees(math.atan((2. * (((a ** 2) * b) - x)) / (a ** 3)))
  else:
    theta = math.degrees(math.atan((a * (b ** 2))/ (2. * x)))
    print(theta)

### FIXED CODE ###

#D
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x > 0.5*a*a*b:
    theta = math.degrees(math.atan((2. * (((a ** 2) * b) - x)) / (a ** 3)))
else:
    theta = math.degrees(math.atan((a * (b ** 2))/ (2. * x)))
print(theta)
# -*- coding:utf-8 -*-
def search(t, x, i):
#    print('t:'+str(t)+' x:'+str(x)+' i:'+str(i))
    global X
#    print(l)
#    print('X:'+str(X))
    if x == X:
        #l.append(t)
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3


X = int(input())
ans = search(0, 0, 1)
print(ans)

### FIXED CODE ###

# -*- coding:utf-8 -*-
'''
def search(t, x, i):
    global X
    if x == X:
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3
'''
X = int(input())
p, i = (0,0)
while True:
    p += i
    i += 1
    if p >= X:
        break
print(i-1)
'''
ans = search(0, 0, 1)
print(ans)
'''
a = int(input())
b = int(input())
h = int(input())
m = int(input())
ans = math.sqrt(a^2+b^2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi))
print(ans)

### FIXED CODE ###

import math
a,b,h,m = map(int, input().split())
ans = math.sqrt(float(a)**2+float(b)**2-2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2))
print(ans)
N = int(input())

An = list(map(int, input().split()))

sum_of_an = sum(An)

if sum_of_an % 2 == 0:
    half_of_an = sum_of_an / 2
    sum_left_len = 0
    for l in An:
        sum_left_len += l
        if sum_left_len == half_of_an:
            print(0)
            exit(0)
        elif sum_left_len > half_of_an:
            break
min_yen = None
left_len = 0
for (i, l) in zip(range(0, N), An):
    if i == N:
        break

    left_len += l
    if min_yen is None:
        min_yen = abs(sum_of_an - left_len)
    else:
        min_yen = min(min_yen, abs(sum_of_an, left_len))

print(min_yen)

### FIXED CODE ###

N = int(input())

An = list(map(int, input().split()))

sum_of_an = sum(An)

if sum_of_an % 2 == 0:
    half_of_an = sum_of_an / 2
    sum_left_len = 0
    for l in An:
        sum_left_len += l
        if sum_left_len == half_of_an:
            print(0)
            exit(0)
        elif sum_left_len > half_of_an:
            break
min_yen = None
left_len = 0
for (i, l) in zip(range(0, N), An):
    if i == N - 1:
        break

    left_len += l
    if min_yen is None:
        min_yen = abs(sum_of_an - left_len * 2)
    else:
        min_yen = min(min_yen, abs(sum_of_an - left_len * 2))

print(min_yen)
n = int(input())
a = [int(i) for i in input().split()]

b = [0]*10**5

for i in range(n):
    b[a[i]] += 1

c = []
for i in range(n):
    if b[i] == 2 or b[i] == 3:
        c.append(i+1)
    elif b[i] >= 4:
        c.append(i+1)
        c.append(i+1)

if len(c) >= 3:
    
    e = max(c)
    c.pop(e)
    f = max(c)
    print(e*f)
else:
    print(0)

### FIXED CODE ###

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

a.sort(reverse = True)
ans = 0
b = a.copy()
b = list(set(b))
b.sort(reverse = True)
c = [0]*len(b)
j = 0
c[j] = 1
for i in range(1,n):
    if a[i-1] == a[i]:
        c[j] +=1
    else:
        j+=1
        c[j] +=1
for i in range(len(b)):
    if c[i] >= 4:    
        
        ans = b[i]*b[i]
        break
    elif c[i] >= 2:
        for j in range(i+1,len(b)):
            if c[j] >= 2:
                ans = b[i]*b[j]
                break
        break
print(ans)
print(a + (a ** 2) + (a ** 3))

### FIXED CODE ###

a = int(input())
print(a + a ** 2 + a ** 3)
predict, actual = input(),input()
a = 0
for i in range(3):
	if(predict[i] == actual[i]):
    	a = a + 1
print(a)

### FIXED CODE ###

predict, actual = input(),input()
a = 0
for i in range(3):
    if(predict[i] == actual[i]):
        a = a + 1
print(a)
n = int(input().split())
d = list(map(int,input().split()))
print((sum(d)**2-sum(d[i]**2 for i in range(n)))//2)

             

### FIXED CODE ###

n = int(input())
d = list(map(int,input().split()))
print((sum(d)**2-sum(d[i]**2 for i in range(n)))//2)
a=list(input())
b=a(0)
c=a(1)
d=a(2)
e=c/b
if e>d:
  print(d)
elif d>e:
  print(e)


### FIXED CODE ###

a=list(input().split())
b=int(a[0])
c=int(a[1])
d=int(a[2])
e=int(c/b)
if e>=d:
  print(d)
elif d>e:
  print(e)
mod = 10**9 + 7
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
def comb(n, r, mod):
    if r < 0 or r > n:
        return 0
    r = min(r, n - r)
    return g1[n] * g2[r] * g2[n-r] % mod

N, K = map(int, input().split())
R = N - K
for i in range(1, K+1):
  print(comb(K-1, i-1)*comb(R+1, i) % mod)

### FIXED CODE ###

mod = 10**9 + 7
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]

for i in range(2, 10 ** 6 + 1):
    g1.append((g1[-1] * i) % mod)
    inverse.append((-inverse[mod % i] * (mod // i)) % mod)
    g2.append((g2[-1] * inverse[-1]) % mod)


def comb(n, r, mod):
    if r < 0 or r > n:
        return 0
    r = min(r, n - r)
    return g1[n] * g2[r] * g2[n-r] % mod

N, K = map(int, input().split())
R = N - K
for i in range(1, K+1):
  print(comb(K-1, i-1, mod)*comb(R+1, i, mod) % mod)
def cns(ls,m,sm):
    global n, s
    count = 0
    if m == n:
        if sm == s: return 1
        else      : return 0
    elif s-mx(9-m) <= sm <= s:
        for i in range(9-m+1):
            rls = ls[:]
            k = rls.pop(i)
            count += cns(rls,m+1,sm+(m+1)*k)
        return count
    else: return 0

def mx(i):
    if i <= 0: return 0
    else     : return (i+1)*i + mx(i-1)

ls = [0,1,2,3,4,5,6,7,8,9]
while True:
    n, s = map(int, raw_input().split())
    if s > mx(n): print 0
    else        : print cns(ls,0,0)

### FIXED CODE ###

def mxmn(ls,m):
	global n
	s1,s2 = 0, 0
	for i in range(m):
		s1 += (n-i)*ls[-i-1]
		s2 += (n-i)*ls[i]
	return s1,s2

def f(ls,m,s):
	global n
	count = 0
	if m > 0:
		mx,mn = mxmn(ls,m)
		if mx < s or mn > s: return 0
		elif mx == s or mn == s: return 1
		for i in range(len(ls)):
			lls = ls[:]
			a = (n-m+1)*lls.pop(i)
			if s-a < 0:	break
			else: count += f(lls,m-1,s-a)
		return count
	else:
		return 1 if s == 0 else 0
			
ls = [i for i in range(10)]
while True:
	try:
		n,s = map(int, raw_input().split())
		print f(ls,n,s)
	except:
		break
a = list(map(int,input().split())
i=0         
for i in range(a):
         if a[i] == 0:
         print(i-1)

### FIXED CODE ###

line = list(map(int, input().split()))
for i in range(5):
  if line[i] == 0:
    print(i+1)
a=input()
b=int(input())
c=1
if a[0]!="1":
  print(a[0])
if a[0]=="1":
  for i in range(len(a)-1):
    if a[i]=="1" and a[i+1]=="1":
      c=c+1
    else:
      break
  if c>b:
    print(1)
  else:
    print(a[c])

### FIXED CODE ###

a=input()
b=int(input())
c=1
if a[0]!="1":
  print(a[0])
if a[0]=="1":
  for i in range(len(a)-1):
    if a[i]=="1" and a[i+1]=="1":
      c=c+1
    else:
      break
  if c>=b:
    print(1)
  else:
    print(a[c])
N,M=map(int,input().split())
a=[0]
for _ in range(M):
    a.append(int(input()))

b=[]
b.append(a[1]-a[0]-1)
for i in range(1,M):
    if i==0:
        b.append(1)
    elif a[i+1]-a[i]==1 and i!=0:
        b.append(0)
    else:
        b.append(a[i+1]-a[i]-2)
b.append(N-a[M]-1)

num=max(b)

mod=1000000007

def fib(n,num):
    fib=[0 for i in range(num+1)]
    fib[0]=1
    fib[1]=1
    for i in range(2,num+1):
        fib[i]=fib[i-1]+fib[i-2]
    return fib[n]
p=1
for j in range(M+1):
    p*=fib(b[j],num)

if 0 in b[1:]:
    print(0)
else:
    print(p%mod)

### FIXED CODE ###

N,M=map(int,input().split())
a=[0]
for _ in range(M):
    a.append(int(input()))

b=[]
num=0
if len(a)>1:
    b.append(a[1]-a[0]-1)
    for i in range(1,M):
            b.append(a[i+1]-a[i]-2)
    b.append(N-a[M]-1)
else:
    b.append(N)

num=max(b)


mod=1000000007

def fib(n,num):
    fib=[0 for i in range(num+10)]
    fib[0]=1
    fib[1]=1
    for i in range(2,num+1):
        fib[i]=fib[i-1]+fib[i-2]
    return fib[n]

if -1 in b:
    print(0)
else:
    p=1
    for j in range(M+1):
        p*=fib(b[j],num)
    print(p%mod)
import math
 
def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b, a % b)

A, B = map(int, input().split(" "))
if A >= B:
  C = gcd(A,B)
else:
  C = gcd(B,A)

#c = math.ceil(math.sqrt(C)) + 1
l = [1]
f = [0]*C
ans = 0
 
for i in range(2,C+1):
  if f[i-1] == 0:
    f[i-1] = 1
    if C % i == 0:
      l.append(i)
    for j in range(i+i, C+1, i):
      f[j-1] = 1

print(len(l))

### FIXED CODE ###

import math
 
def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b, a % b)

A, B = map(int, input().split(" "))
if A >= B:
  C = gcd(A,B)
else:
  C = gcd(B,A)

c = math.ceil(math.sqrt(C)) + 1
l = [1]
f = [1] + [0]*c

for i in range(2,c+1):
  if f[i-1] == 0:
    f[i-1] = 1
    if C % i == 0:
      l.append(i)
      while C % i == 0:
        C //= i
    for j in range(i+i, c+1, i):
      f[j-1] = 1

if C > 1:
  l.append(C)

print(len(l))
a, b, c = map(int, inpuy().split( ))
d = a-b
print(min(c-d, 0))

### FIXED CODE ###

a, b, c = map(int, input().split( ))
d = a-b
print(max(c-d, 0))
H, W, K = map(int, input().split())

cake = [list(input()) for _ in range(H)]
ans = [[0] * W for _ in range(H)]

id = 1
sign = 0

for i in range(H):
    for j in range(W):
        if cake[i][j] == '#':
            ans[i][sign:j+1] = [id] * (j+1-sign)
            sign = j+1
            id += 1
        elif j == W-1:
            ans[i][sign:j+1] = [id-1] * (j+1-sign)
    sign = 0

for i in range(H):
    for j in range(W):
        print(f'{ans[i][j]} ', end='')
    print()

### FIXED CODE ###

H, W, K = map(int, input().split())

cake = [list(input()) for _ in range(H)]
ans = [[0] * W for _ in range(H)]

id = 1
sign = 0
nothing = 0

for i in range(H):
    if cake[i].count('#') == 0:
        nothing += 1
        if i == H-1:
            for j in range(W):
                for d in range(nothing):
                    ans[i-d][j] = ans[i-nothing][j]
        continue
    for j in range(W):
        if cake[i][j] == '#':
            ans[i][sign:j+1] = [id] * (j+1-sign)
            sign = j+1
            id += 1
        elif j == W-1:
            ans[i][sign:j+1] = [id-1] * (j+1-sign)
    if nothing != 0:
        for j in range(W):
            for d in range(1,nothing+1):
                ans[i-d][j] = ans[i][j]
    sign = 0
    nothing = 0

for i in range(H):
    for j in range(W):
        print('{} '.format(ans[i][j]), end='')
    print()
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        System.out.println(N / 3);
    }

}


### FIXED CODE ###

if __name__ =='__main__':
    N = int(input())

    print(N // 3)
a,b=map(int,input());ans=0
if a<b:ans+=b;b-=1
else:ans+=a;a-=1
ans+=max(a,b)
print(ans)

### FIXED CODE ###

a,b=map(int,input().split());ans=0
if a<b:ans+=b;b-=1
else:ans+=a;a-=1
ans+=max(a,b)
print(ans)
from collections import Counter
from scipy.special import comb
N = int(input())
s = [input() for i in range(N)]
c = []
rem = []
num = 0
for i,si in enumerate(s):
    s.pop(i)
    snum = 0
    for j,sj in enumerate(s):
        if Counter(si) == Counter(sj):
            snum+=1
            rem.append(j)
    rem.reverse()
    num += comb(snum+1, 2, exact=True)
    for r in rem:
        s.pop(r)
    rem.clear()
print(num)

### FIXED CODE ###

N = int(input())
s = ["".join(sorted(input())) for i in range(N)]
s.sort()
ss = s[0]
num = 0
ans=0
for i in range(N):
    if ss == s[i]:
        num+=1
    else:
        ans+=num*(num-1)//2
        num=1
        ss=s[i]
ans+=num*(num-1)//2
print(ans)
xs = map(int, raw_input())
print 'YES' if sorted(xs) == [5, 5, 7] else 'NO'

### FIXED CODE ###

xs = map(int, raw_input().split())
print 'YES' if sorted(xs) == [5, 5, 7] else 'NO'
N, M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
cd = [list(map(int, input().split())) for _ in range(M)]

for i in range(N):
    d = []
    for j in range(M):
        d.append(abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - ab[j][1]))
    print(d.index(min(d)) + 1)

### FIXED CODE ###

N, M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
cd = [list(map(int, input().split())) for _ in range(M)]

for i in range(N):
  d = []
  for j in range(M):
    d.append(abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - cd[j][1]))
  print(d.index(min(d)) + 1)
N, M = map(int, input().split())
parent = [-1] * N


def union(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    parent[x] = y


def find(x):
    if parent[x] == -1:
        return x
    res = parent[x] = find(parent[x])
    return res

for _ in range(M):
    a, b = map(int, input().split())
    union(a - 1, b - 1)


count = [0] * N
for i in range(N):
    if 0 <= find(i) < N:
        count[find(i)] += 1
    else:
        print(N)
        break
else:
    print(max(count))

### FIXED CODE ###

from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)


N, M = map(int, input().split())
parent = [-1] * N


def union(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    parent[x] = y


def find(x):
    if parent[x] == -1:
        return x
    res = parent[x] = find(parent[x])
    return res

for _ in range(M):
    a, b = map(int, input().split())
    union(a - 1, b - 1)


count = Counter(find(i) for i in range(N))
print(count.most_common(1)[0][1])
#import numpy as np

N = int(input())
A = list(map(int, input().split()))
A.sort()#わるほう

#kouho = sorted([x for x in set(A) if A.count(x) == 1])
#maxA = 10**5

#target = kouho[:]
maxA = 10**5
work=[0]*(maxA+1)

for i in range(len(A)):
    maxN = int(maxA/A[i])
    for n in range(1,maxN+1):
        buf = A[i]*n
        #remove_list.append(buf)
        work[buf]+=1
            #print(A[i]*n)

#target = kouho[:]
#kouho = list(set(kouho) - set(remove_list))

sm=0
for s in A:
    if work[s]==1: sm+=1
print(sm)

#print(len(kouho))

### FIXED CODE ###

#import numpy as np

N = int(input())
A = list(map(int, input().split()))
A.sort()#わるほう

#kouho = sorted([x for x in set(A) if A.count(x) == 1])
#maxA = 10**5

#target = kouho[:]
maxA = A[-1]
work=[0]*(A[-1]+1)

for i in range(len(A)):
    if work[A[i]]<=1:
        maxN = int(maxA/A[i])
        for n in range(1,maxN+1):
            buf = A[i]*n
            #remove_list.append(buf)
            work[buf]+=1
                #print(A[i]*n)

#target = kouho[:]
#kouho = list(set(kouho) - set(remove_list))

sm=0
for s in A:
    if work[s]==1: sm+=1
print(sm)

#print(len(kouho))
n = int(input())
a = list(map(int, input().split()))
MOD = 10 ** 9 + 7
C = [0] * n
C[0] = 3
ans = 1
for i in a:
    ans = ans * C[i] % MOD
    C[i] -= 1
    C[i+1] += 1
print(ans % MOD)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
MOD = 10 ** 9 + 7
C = [0] * (n + 1)
C[0] = 3
ans = 1
for i in a:
    ans = ans * C[i] % MOD
    C[i] -= 1
    C[i+1] += 1
print(ans % MOD)
n,k=map(int,input().split())
A=[int(i) for i in input().split()]


def f(A,i):
    return sum([(a-1)//i for a in A])
l=-1
r=10**9+1
while r-l>1:
    m = (l+r)//2
    #print(m)
    x = f(A,m)
    if x<=k:
        r=m
    else:
        l=m
    #print(x,k,l,r,m)
print(m)

### FIXED CODE ###

n,k=map(int,input().split())
A=[int(i) for i in input().split()]


def f(i):
    if i<=0: return False
    if i>= 10**9: return True
    x = sum([(a-1)//i for a in A])
    if x<=k:
        return True
    else:
        return False
l=-1
r=10**9
while r-l>1:
    m = (l+r)//2
    if f(m):
        r=m
    else:
        l=m
    #print(l,m,r)
print(r)
n=int(input())
s=list(input())
a=[]
a.append(s[0])
for i in range(n-1):
  if s[i] != s[i+1]:
    a.append(s[l+1])
  else:
    continue
print(len(a))

### FIXED CODE ###

n=int(input())
s=list(input())
a=[]
a.append(s[0])
for i in range(n-1):
  if s[i] != s[i+1]:
    a.append(s[i+1])
  else:
    continue
print(len(a))
def search(x, num):
    search_list = []
    for y in edge[x]:
        if y in nodes:
            nodes.remove(y)
            edge[y].remove(x)
            search_list.append(y)
    for y in search_list:
        num = search(y, num)
    return num+1


(n,m),*d  = [list(map(int, s.split())) for s in open(0)]

edge = [set() for _ in range(n+1)]
for x in d:
    edge[x[0]].add(x[1])
    edge[x[1]].add(x[0])

nodes = set(range(1,n+1))
ans = 1
for x in range(1,n+1):
    if x not in nodes:
        continue
    tmp = search(x, 0)
    ans = max(tmp, ans)
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(int(1e6))

def search(x, num):
    nodes.remove(x)
#     for y in edge[x]:
#         edge[y].discard(x)
#     for y in list(edge[x]):
    for y in edge[x]:
        if y in nodes:
            num = search(y, num)
    return num + 1

(n,m),*d  = [list(map(int, s.split())) for s in open(0)]

edge = [set() for _ in range(n+1)]
for x in d:
    edge[x[0]].add(x[1])
    edge[x[1]].add(x[0])

nodes = set(range(1,n+1))
ans = 1
for x in list(nodes):
    if x in nodes:
        ans = max(ans, search(x, 0))
print(ans)
n,a,b=map(int,input().split())
if abs(a-b)%2 == 0:
  print(abs(a-b)//2)
else:
  

### FIXED CODE ###

n,a,b=map(int,input().split())
if abs(a-b)%2 == 0:
  print(abs(a-b)//2)
else:
  print(min((2*n-a-b)//2+1,(a+b-2)//2+1))
n = int(input())
A = list(map(int, input().split()))

ans = 0
for i in range(n-1):
    ans = (ans+(A[i]*sum(A[i+1:])%MOD)%MOD)%MOD
print(ans)

### FIXED CODE ###

MOD = 10**9 + 7
n = int(input())
A = list(map(int, input().split()))

import numpy
A_CS = numpy.cumsum(sorted(A, reverse=True))
A_CS = A_CS%MOD

A = sorted(A)

#print(A_CS)
ans = 0
for i in range(n-1):
#    print(A[i], A_CS[-i-2])
#    A_CS -= A[i]
    ans = (ans+(A[i]*A_CS[-i-2])%MOD)%MOD
print(ans)
import sys
sys.setrecursionlimit(100000000000)
input = sys.stdin.readline

N,M = (int(x) for x in input().split())
a = set(int(input()) for _ in range(M))
mem = [0] * N
def count_steps(n):
    if mem[n-1]:
        return mem[n-1]
    elif n - 1 in a and n - 2 in a:
        return 0
    elif n - 1 in a:
        if n > 2:
            mem[n-1] = count_steps(n-2)
            return mem[n-1]
        else:
            mem[1] = 1
            return 1
    elif n - 2 in a:
        mem[n-1] = count_steps(n-1)
        return mem[n-1]
    elif n == 1:
        mem[0] = 1
        return 1
    elif n == 2:
        mem[1] = 2
        return 2
    else:
        mem[n-1] = (count_steps(n-1) + count_steps(n-2)) % 1000000007
        return mem[n-1]
print(count_steps(N))

### FIXED CODE ###

N,M = (int(x) for x in input().split())
a = set(int(input()) for _ in range(M))
dp = [0] * N
broke = False
if N == 1:
    print('1')
    broke = True
elif 1 in a and 2 not in a:
    dp[1] = 1
elif 1 not in a and 2 in a:
    dp[0] = 1
else:
    dp[0] = 1
    dp[1] = 2
if 1 in a and 2 in a:
    print('0')
    broke = True
else:
    for i in range(3,N+1):
        if i-1 in a and i-2 in a:
            print('0')
            broke = True
            break
        elif i-1 in a:
            dp[i-1] = dp[i-3]
        elif i-2 in a:
            dp[i-1] = dp[i-2]
        else:
            dp[i-1] = (dp[i-2] + dp[i-3]) % 1000000007
if broke == False:
    print(dp[N-1])
s = list(input())
int pattern_a_count = 0
int pattern_b_count = 0

for index, value in enumerate(s):
  if index % 2 =0:
    if value == "0":
      pattern_a_count += 1
  if index % 2 =1:
    if value == "1":
      pattern_a_count += 1
      
for index, value in enumerate(s):
  if index % 2 =0:
    if value == "1":
      pattern_b_count += 1
  if index % 2 =1:
    if value == "0":
      pattern_b_count += 1
      
res = pattern_b_count
if pattern_a_count <= pattern_b_count:
  res = pattern_a_count
print(pattern_a_count)

### FIXED CODE ###

s = list(input())
pattern_a_count = 0
pattern_b_count = 0

# 1010パターン
for index, value in enumerate(s):
  if index % 2 == 0:
    if value == "0":
      pattern_a_count += 1
  if index % 2 == 1:
    if value == "1":
      pattern_a_count += 1

# 0101
for index, value in enumerate(s):
  if index % 2 == 0:
    if value == "1":
      pattern_b_count += 1
  if index % 2 == 1:
    if value == "0":
      pattern_b_count += 1
      
res = pattern_b_count
if pattern_a_count <= pattern_b_count:
  res = pattern_a_count
print(res)
n = []
for i in range(5):
    n.append(int(input()))

n_ = []
for i in n:
    if i % 10 == 0:
        continue
    n_.append(10 - i % 10)

print(sum(n) + sum(n_) - max(n_))

### FIXED CODE ###

n = []
for i in range(5):
    n.append(int(input()))

n_ = [0]
for i in n:
    if i % 10 == 0:
        continue
    n_.append(10 - i % 10)

print(sum(n) + sum(n_) - max(n_))
while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    for i in range(h)
        print("#")
    print()

### FIXED CODE ###

while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    for i in range(h):
        print("#"*w)
    print("")
import numpy as np
n=input()
v=np.array(map(int, input().split()))
c=np.array(map(int, input().split()))
t=v-c
a=0
for i in range(n)
if t[i]>0 :
a+=t[i]
print(a)

### FIXED CODE ###

a,b,t = map(int,input().split())
print(b*(t//a))
def main():
    import fractions
    import sys
    input = sys.stdin.readline
    n=int(input())
    a = tuple(map(int, input().split()))
    ans = a[0]

    mmm=10**9+7
    for i in a[1:]:
        ans = 8ans *i )// fractions.gcd(ans, i)

    result=0
    for item in a:
      result+=ans//item

    print(result%mmm)

if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    from fractions import gcd
    import sys
    n=int(input())
    a = tuple(map(int, input().split()))
    ans = 1

    mmm=10**9+7
    for i in a:
        ans = ans *i // gcd(ans, i)

    result=0
    for item in a:
      result+=ans//item

    print(result%mmm)

if __name__ == '__main__':
    main()
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import math

PI = math.pi
r = int(input())
s = PI*r**2
l = 2*r*PI
print('%.6f %.6f' % (s, l))

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import math

PI = math.pi
r = float(input())
s = r*r*PI
l = 2*r*PI
print('%.6f %.6f' % (s, l))
import math
A,B,C,D = map(int,input().split())
n = C * D / math.gcd(C,D)
C_D = (B - A + 1) / n
c = (B - A + 1) / C
d = (B - A + 1) / D
m = c + d - C_D
ans = int((B - A + 1) - m)
print(ans)


### FIXED CODE ###

A, B, C, D = map(int, input().split())
def gcd(a, b):
  if a % b is 0:
    return b
  return gcd(b, a % b)
 
def solve(n):
  return n - (n // C) - (n // D) + (n // (C * D // gcd(C, D)))
 
print(solve(B) - solve(A - 1))