Problem:


Score : 100 points

Problem Statement

Given is an integer N.

Takahashi chooses an integer a from the positive integers not greater than N with equal probability.

Find the probability that a is odd.

Constraints

1 \leq N \leq 100

Input

Input is given from Standard Input in the following format:

N

Output

Print the probability that a is odd.
Your output will be considered correct when its absolute or relative error from the judge's output is at most 10^{-6}.

Sample Input 1

4

Sample Output 1

0.5000000000

There are four positive integers not greater than 4: 1, 2, 3, and 4. Among them, we have two odd numbers: 1 and 3. Thus, the answer is \frac{2}{4} = 0.5.

Sample Input 2

5

Sample Output 2

0.6000000000

Sample Input 3

1

Sample Output 3

1.0000000000



Sample input:
4


Sample output:
0.5000000000

Submission status: Accepted

Solution code:
ans = int(input())
if ans == 1: print(ans)
elif ans % 2 == 1:
    print( (int(ans/2)+1)/ans )
elif ans % 2 ==0:
    print((int(ans/2))/ans)

Submission status: Accepted

Solution code:
N = int(input())
kisuu = (N/2)
kisuu = -(-N // 2)
result = kisuu/N
print("{:.6f}".format(result))

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
  print(int(N/2)/N)
else:
  print(int((N+1)/2)/N)

Submission status: Accepted

Solution code:
n=int(input())
a=n//2
print((a+1)/n if n%2==1 else a/n)

Submission status: Accepted

Solution code:
x=int(input())
ans=(x+1)//2/x
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
  print(0.5)
else:
  print((N + 1) // 2 / N)

Submission status: Accepted

Solution code:
n =int(input())
a = 0.000000
b = 0.000000

for i in range(1,n+1):
    if i%2 == 0:
        a += 1
    else:
        b += 1
print('{:.10g}'.format(b/(a+b)))

Submission status: Accepted

Solution code:
n = int(input())
if n == 1:
  print(1.0)
elif n % 2 == 0:
  print(0.50)
else:
  print(float(n + 1) / (2 * n))

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
  print(0.5000000000)
else:
  print('{:.10g}'.format((N+1)/(2*N)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 天気の入力
N = int(input())
# 出力
# 奇数を取得
num_odds = 0
for i in range(N):
    if (i+1) % 2 == 1:
        num_odds += 1

print(num_odds/N)

Submission status: Accepted

Solution code:
N = int(input())
ans = (N + 1) // 2
print(ans / N)

Submission status: Accepted

Solution code:
from math import ceil

n = int(input())
ans = (ceil(n/2))/n
print('{:.6f}'.format(ans))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    l = [x for x in range(1, n + 1) if x % 2 == 1]
    print(l.__len__() / n)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = int(input())
print(((a+(a%2))/2)/a)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N=int(input())
i=0
c=0
while i < N+1:
    i+=1
    if i%2==0:
        c+=1
    else:
        continue
    
print(c/N)

Submission status: Accepted

Solution code:
N = int(input())
cnt = 0
ans = 0

for i in range(1,N+1):
     if i % 2 == 1 :
        cnt += 1
ans = cnt / N
print('{:.10f}'.format(ans))

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
  print(1/2)
else:
  print(1 - (N - 1)/2/N)

Submission status: Accepted

Solution code:
N = int(input())
if N%2 == 0:
    print((N/2)/N)
else:
    print((N//2+1)/N)

Submission status: Accepted

Solution code:
a = int(input())

i = 1
odds = 0
while i <= a:
    if i % 2 == 1:
        odds = odds + 1
        i = i +1
    else:
        i = i + 1

print(odds/a)

Submission status: Accepted

Solution code:
n=int(input())
a=(n+1)//2
print(a/n)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0

if n % 2 == 0:
  ans = (n / 2) / n
else:
  ans = ((n + 1) / 2) / n
  
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

if (n % 2 == 0):
  answer = (n/2) / n

else:
  answer = ((n+1) / 2) / n

print(answer)

Submission status: Accepted

Solution code:
import decimal
num_list = []
s = int(input())
num_list = list(range(1,s + 1))
odd = decimal.Decimal(len(num_list[0::2]))
print('{:.10f}'.format(1 * (odd / decimal.Decimal(s))))

Submission status: Accepted

Solution code:
n=int(input())
print('{:.8f}'.format(((n+1)//2)/n))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    if(N==1):
        print('{:.10f}'.format(1.0))
        return
    if(N%2==0):
        print('{:.10f}'.format(0.5))
    else:
        result = (N - (N-1)/2)/N
        print('{:.10f}'.format(result))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

print((n - (n // 2)) / n)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
  print(0.5)
else:
  a = n // 2
  print((n-a)/n)

Submission status: Accepted

Solution code:
n = int(input())
even, odd = n >> 1, (n >> 1) + (n & 1)
print(odd / n)

Submission status: Accepted

Solution code:
N=int(input()) 
cnt = 0

for i in range(1,N+1):
    if i%2 ==1:
        cnt +=1
print(cnt/N)

Submission status: Accepted

Solution code:
Ns = input()
N = int(Ns)
if(N % 2 == 1):
  if(N == 1):
    print('{:.7f}'.format(N))
  else:
    print('{:.7f}'.format(((N+1)/2)/N))
else:
  print('{:.7f}'.format(1/2))

Submission status: Accepted

Solution code:
n = int(input())
x = (n + 1)//2;
x = x / n
print(x)

Submission status: Accepted

Solution code:
number = int(input())

if number % 2 == 0:
    final = (number // 2) / number
    print("%.6f"% final)
elif number % 2 != 0:
    final = ((number // 2) + 1) / number
    print("%.6f"% final)

Submission status: Accepted

Solution code:
n=int(input())

if n % 2 ==1:
  print((n+1)/(2*n))
else:
  print(1/2)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

if N%2==0:
    print(N/(2*N))
else:
    print((N+1)/(2*N))

Submission status: Accepted

Solution code:
a = int(input())

probability = 0.0
if a%2 == 0:
	probability = 0.5
else:
	probability = 1.0/float(a)*(int(a/2) + 1)
  
print(probability)

Submission status: Accepted

Solution code:
N = int(input())
l = [i for i in range(1,N+1) if i%2>0]
print(len(l)/N)

Submission status: Accepted

Solution code:
n = int(input())

count = 0
for i in range(n+1):
    if i % 2 != 0:
        count += 1
        
print(count / n)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())

print((N%2+N//2)/N)

Submission status: Accepted

Solution code:
n = int(input())
if n%2==0:
    n1 = n/2
else :
    n1 = int(n/2)+1
print(n1/n)

Submission status: Accepted

Solution code:
n=int(input())
print(0.5) if n%2==0 else print(((n+1)/2)/n)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 1:
    print(((N-1)/2+1)/N)
else:
    print(0.5)

Submission status: Accepted

Solution code:
N = int(input())
mod=N%2
a=0
if mod==0:
  a=0.5
else:
  a=(N//2+1)/N
print(a)

Submission status: Accepted

Solution code:
from decimal import Decimal
n = int(input())
if n == 1:
    print(1)
elif n % 2 == 0:
    print(0.5)
else:
    print(Decimal(1/(2*n))+Decimal(0.5))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
if n % 2 == 0:
    print(0.5)
else:
    odds = (n-1)/2 + 1
    print(odds / n)

Submission status: Accepted

Solution code:
N = int(input())

if(N%2 == 0):
	print((N//2)/N)
else:
	print((N//2 + 1)/N)

Submission status: Accepted

Solution code:
n = int(input())
print('%0.7f' % (((n >> 1) + (n & 1)) / n))

Submission status: Accepted

Solution code:
N = int(input())

a = 0
for i in range(1,N+1):
    if i % 2 != 0:
        a+=1
print(a/N)

Submission status: Accepted

Solution code:

a = int(input())
if a == 1:
    print(1.0)
elif a % 2 == 0:
    print(0.5)
else:
    print((int(a / 2) + 1) / float(a))

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
print(((n+1)//2)/n)

Submission status: Accepted

Solution code:
n = int(raw_input())
if n%2 == 0:
  print(0.5)
else:
  print(float(n/2+1)/(float(n)))

Submission status: Accepted

Solution code:
n = int(input())

if n == 1:
  print(1)
elif n % 2 == 0:
  a = n / 2 / n
  print(a)
else:
  a = (n / 2  + 0.5) / n
  print(a)

Submission status: Accepted

Solution code:
a=int(input())
if a==1:
    print(1)
else:
    if a%2==1:
        print(float((a//2+1)/a))
       
    else:
        print(float(1/2))

Submission status: Accepted

Solution code:
s=input()
a=int(s)
if a==1:
  print(a/1)
elif a!=1 and a%2==1:
  b=(a-1)/2+1
  print(b/a)
else:
  print(1/2)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
    print(float(n / 2) / n)
else:
    print(float((n-1) / 2 + 1) / n)

Submission status: Accepted

Solution code:
v=int(input())
if (v % 2 == 0):
    print 0.5
else:
    print (v/2+1.0)/v

Submission status: Accepted

Solution code:
N=int(input())
a=int(N/2)
if N%2==1:
	b=a+1
else:
	b=a
print(b/N)

Submission status: Accepted

Solution code:
import numpy as np

a = int(input())
if a == 1:
    print(1)
elif a%2 == 0:
    print(0.5)
else:
    print((a//2+1)/a)

Submission status: Accepted

Solution code:
def A_OddsofOddness():
    N = int(input())
    ans = 0.5
    if N % 2 == 1:
        ans = (N // 2 + 1.0) / N
    print(ans)
if __name__ == "__main__":
    A_OddsofOddness()

Submission status: Accepted

Solution code:
n = int(input())

k = n%2
if n == 1:
    print('{:.10f}'.format(1.0000000000))
elif k == 1:
    print('{:.10f}'.format((n//2 + 1)/n))
else:
    print('{:.10f}'.format(0.5000000000))

Submission status: Accepted

Solution code:
n = int(input())

p = 1 - (n // 2) / n
print(p)

Submission status: Accepted

Solution code:
import math
n = int(input())

if n % 2 == 2:
  print(0.5)
else:
  print('{:.1000f}'.format(math.ceil(n / 2) / n))

Submission status: Accepted

Solution code:
n = int(input())

print((n+1)//2/n)

Submission status: Accepted

Solution code:
n = int(input())

if n%2 == 0:
  print(0.5)
else:
  print((n//2+1)/n)

Submission status: Accepted

Solution code:
import math
N = int(input())

if N % 2 == 0:
    print(0.5)

elif N == 1:
    print(1)
else:
    print(math.ceil(N / 2) / N)

Submission status: Accepted

Solution code:
n=int(input())
print('{:.7g}'.format((n-n//2)/n))

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
  p = 0.5000000
else:
  p = ((n-1)/2+1)/n
print("{:.10f}".format(p))

Submission status: Accepted

Solution code:
n = int(input())
 
if n == 1:
  ans = 1.0000000000
elif n % 2 == 1:
  ans = ((n+1)/2)/n
elif n % 2 == 0:
  ans = 0.5000000000
print('{:.7f}'.format(ans))

Submission status: Accepted

Solution code:
n=int(input())
if n%2:
    print((n//2+1)/n)
else:
    print(0.5)

Submission status: Accepted

Solution code:
a=int(input())
b=a+1
c=0
d=0
for i in range(b):
	c=i%2
	if c == 1:
		d=d+1
	else:
		pass
e=d/a
print(e)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
if n % 2 == 0:
    print(1/2)
elif n == 1:
    print(1)
else:
    s = n//2 + 1
    print(s/n)

Submission status: Accepted

Solution code:
N = int(input())
a = 0
for k in range(1,N+1):
    if k % 2==1:
        a += 1
answer = a/N
print(answer)

Submission status: Accepted

Solution code:
A = int(input())
list = []
ls = []
m = 0
for i in range(A):
  i += 1
  n = i%2
  if n == 1:
    list.append(i)
  else:
    ls.append(i)
m = len(ls)+len(list)
print(len(list)/m)

Submission status: Accepted

Solution code:
import sys
import os
input = input()
x = int(input)
if x % 2 == 0 :
    y = x / 2
else:
    y = (x - 1)/2 + 1

z = y / x
print(z)

Submission status: Accepted

Solution code:
import math
N = int(input())
odd = math.floor(N/2) + N%2
print(odd/N)

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
    print(0.5)
else:
    m=n//2+1
    x=m/n
    print(x)

Submission status: Accepted

Solution code:

N = int(input())

odds = 0
for i in range(N) :
    if (i + 1) % 2 == 0 :
        continue
    else :
        odds = odds + 1
        
print(float(odds)/float(N))

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
    print(1/2)
else:
    print((n+1)/2/n)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = input()
    odd_count = 0
    even_count = 0

    for i in range(1, (int(N)+1)):
        remainder = i % 2
        if remainder == 0:
            even_count = even_count + 1
        else:
            odd_count = odd_count + 1

    print(odd_count / int(N))

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0 :
  print( ( n / 2 ) / n  )
elif n == 1 :
  print( n )
else:
  print( ( ( ( n - 1 )  / 2 ) +1 ) / n )

Submission status: Accepted

Solution code:

import sys
sys.setrecursionlimit(100000)
import numpy as np

directions=np.array([[1,0],[0,1],[-1,0],[0,-1]])


def acinput():
    return list(map(int,input().split(" ")))




import sys
sys.setrecursionlimit(100000)

import numpy as np

directions = [[1, 0], [0, 1], [-1, 0], [0, -1]]
directions = list(map(np.array, directions))

def acinput():
    return list(map(int, input().split(" ")))

N=int(input())

if N%2==0:
    print(0.5)
else:
    print(np.ceil(N/2)/N)

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
  a=0.5
else:
  a=((n+1)/2)/n
print(a)

Submission status: Accepted

Solution code:
N=int(input())
p=0
if N%2==0:
    p=0.5
else:
    p=(N//2+1)/N
print(p)

Submission status: Accepted

Solution code:
a =int(input())
aa=0
if a %2 == 1:
  aa+=1
aaa =a//2+aa
print(aaa/a)

Submission status: Accepted

Solution code:
n = int(input())
print(1.0-(n//2)/n)

Submission status: Accepted

Solution code:
a = int(raw_input())

if (a%2 == 0):
    print(0.5)
else:
    odd = (a // 2) + 1
    odd = float(odd)
    print (float(odd/a))

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
    val = 0.5
else:
    val = ((n+1)/2)/n

print("{0:.10f}".format(val))

Submission status: Accepted

Solution code:
n=int(input());print(0--n//2/n)

Submission status: Accepted

Solution code:
n = int(input())
if(n%2==0):
  print(1/2)
else:
  print((n+1)/2/n)

Submission status: Accepted

Solution code:
N = int(input())
Out = 0.0
if N % 2 == 0:
    Out = (N/2) / N
else:
    Out = ((N/2)+0.5) / N
print("{:.10f}".format(Out))

Submission status: Accepted

Solution code:
import numpy as np
a = 0
b = 0
N = int(input())
for i in range(N):
    if i%2 == 0:
        a += 1   
result = a/N
print(result)

Submission status: Accepted

Solution code:
N = input()

s = int(N)%2

if s == 0:
  print(0.5)
else:
  a = (int(N)+1)/(2*int(N))
  print(a)

Submission status: Accepted

Solution code:
n=int(input())

if n%2==0:
    print('0.5')
else:
    s=n//2
    print((n-s)/n)

Submission status: Accepted

Solution code:
a =int(input())
s = 0
for i in range(a):
        if (i+1)%2!=0:s+=1
print(s/a)

Submission status: Accepted

Solution code:
N = int(input())
i = 1.0
j =  0.0
while i < N+1:
    if i%2 == 1:
        j = j+1
    i = i+1
ans = j/N
print(ans)

Submission status: Accepted

Solution code:
import math

N = input()
o = math.ceil((float(N) / float(2))) / float(N)
print('{:.10f}'.format(o))

Submission status: Accepted

Solution code:
n = int(input())
odd = n // 2 + n % 2
print(odd / n)

Submission status: Accepted

Solution code:
n=int(input())

a=0
for i in range(n):
  if (i+1) % 2 != 0:
    a+=1

print(a/n)

Submission status: Accepted

Solution code:
#question1
N = input()

if int(N) % 2 == 0:
  ans = 0.5
else:
  ans = ((int(N) - 1) /2 + 1) / int(N)

print(ans)

Submission status: Accepted

Solution code:
i = int(input())
if i % 2 == 0:
    print((i // 2) / i)
else:
    print(((i // 2) + 1) / i)

Submission status: Accepted

Solution code:
a = int(input())

odd_cnt = 0
if a % 2 == 1:
    odd_cnt = int(a / 2) + 1
else:
    odd_cnt = int(a / 2)

ans = odd_cnt / a

print('{}'.format(ans))

Submission status: Accepted

Solution code:
import math
n = int(input())
if n % 2 == 0:
    print(1/2)
else:
    print(math.ceil(n/2)/n)

Submission status: Accepted

Solution code:
n = int(input())

L = []

import sys
if n ==0:
    print(0.0)
    sys.exit()

for val in range(n+1):
    if val % 2 ==1:
        L.append(val)
print(len(L)/n)

Submission status: Accepted

Solution code:
#question1
N = input()

if int(N) % 2 == 0:
  ans = 0.5
elif int(N) == 1:
  ans = 1
else:
  ans = ((int(N) - 1) /2 + 1) / int(N)

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

prob_odd = (N //2 + N % 2) / N

print(prob_odd)

Submission status: Accepted

Solution code:
N = int(input())
count = 0
if N == 1:
    print(1)
else:
    for i in range(1,N+1):
        if i % 2 != 0:
            count += 1
    print(count/N)

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0:
    print(0.5)
else:
    print((N//2+1)/N)

Submission status: Accepted

Solution code:
N = int(input())

print(((N+1)//2)/N)

Submission status: Accepted

Solution code:
n=int(input())
print(1/2 if n % 2 == 0 else (n+1)/(2*n))

Submission status: Accepted

Solution code:
a = int(input())
if a%2==0:
    print("0.5")
else:
    b = a+1
    b = b/2
    print(b/a)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
    print(0.5)
else:
    p = (N - (N-1)/2)/ N
    print(p)

Submission status: Accepted

Solution code:
def _input():
    n = int(input())
    return n

def probability(number):
    odd = 0
    for i in range(1,number + 1):
        if i % 2 == 1:
            odd += 1
    return round(odd / number, 6)

if __name__ == "__main__":
    number = _input()
    print('{:.9f}'.format(probability(number)))

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
    ans = 0.5
else:
    ans = ((N-1)/2 + 1)/N

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
if N % 2 == 0:
    print(N/(2*N))
else:
    print((N+1)/(2*N))

Submission status: Accepted

Solution code:
N=int(input())

if(N%2==0):
  print(0.5)
else:
  print((N//2+1)/N)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def Odd_Judge(n):
    odd_num = int((n-1)/2) + 1
    return odd_num / n

if __name__ == "__main__":
    n = int(input())
    print(Odd_Judge(n))

Submission status: Accepted

Solution code:
n = int(input())

if n==1:
    ans = 1
elif n%2==0:
    ans = 0.5
else:
    ans = ((n-1)/2+1)/n

print(ans)

Submission status: Accepted

Solution code:
n  = int(input())
if n % 2 == 0:
  ans = 0.5
else:
  ans = (n//2+1) / n
print(ans)

Submission status: Accepted

Solution code:
sin = input()
n = int(sin)

if n % 2 == 1:
    print((-(-n // 2))/n)
else:
    print(1/2)

Submission status: Accepted

Solution code:
import sys

def main():

	p = 0

	args = sys.argv
	n = int(input())
	
	print((int(n/2) + n%2 )/n)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
number = int(input())

count = 0
for i in range (1,number+1):
    if i % 2 == 1:
        count += 1
answer = count / number
print(answer)

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
  a=N/2
  b=a/N
  print(b)
else:
  t=N+1
  c=t/2
  d=c/N
  print(d)

Submission status: Accepted

Solution code:
N = float(input())
if N%2==0:
  print(0.5)
else:
  n = N//2 +1
  print(n/N)

Submission status: Accepted

Solution code:
N=int(input())
 
print(1-int(N/2)/N)

Submission status: Accepted

Solution code:
n=int(input())
sum=0
for i in range(1,n+1):
  if i % 2==1:
    sum=sum+1
#print(sum)
print(sum/n)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
    print(0.5)
else:
    print(-(n//-2)/n)

Submission status: Accepted

Solution code:
N = int(input())

ans = ((N - 1) // 2 + 1) / N
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
count = 0
for i in range(1,N+1):
    if i % 2 == 1:
        count = count + 1

result = count / N
print(result)

Submission status: Accepted

Solution code:
#coding: utf-8
n = int(input())
ans = 0

if n == 1:
    ans = 1
elif n % 2 == 0:
    ans = 0.5
else:
    ans = ((n-1)/2+1)/n 
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
m = n // 2
if n % 2 != 0:
    m += 1
print(m / n)

Submission status: Accepted

Solution code:
N=int(input())
if N%2 ==0:
    print(0.5)
else:
    print((N//2+1)/N)

Submission status: Accepted

Solution code:
N = int(raw_input())
ans = float(sum([1 for t in range(1,N+1) if t % 2 == 1])) / float(N)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
  print(N / 2 / N)
else:
  print((N + 1) / 2 / N)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0: print(0.5)
else: print((N // 2 + 1) / N)

Submission status: Accepted

Solution code:
n = int(input())
ans = int((n+1)/2) / n

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
if N%2==1:
    print((N//2+1)/N)
else:
    print(N//2/N)

Submission status: Accepted

Solution code:
n = int(input())

a=0.0
for i in range(1,n+1):
    if i%2==1:
        a += 1

print(float(a/n))

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()

print(((n+1)//2)/n)

Submission status: Accepted

Solution code:
n=int(input())
a=n//2
print((n-a)/n)

Submission status: Accepted

Solution code:
N = int(input())

print(sum(a % 2 for a in range(N+1)) / N)

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0:
  print(1 / 2)
else:
  print((N-(N//2)) / N)

Submission status: Accepted

Solution code:
a = int(input())
if a % 2 == 0:
  print((a//2)/a)
else:
  print(((a//2)+1)/a)

Submission status: Accepted

Solution code:
import sys
import math
N = float(input())
# if(N == 1):
#     print(1)
#     sys.exit()
print('{:.10f}'.format(math.ceil(N/2)/N))

Submission status: Accepted

Solution code:
x = int(input())
if x%2 == 0:
    print(0.5)
else:
    print((-(-x//2))/x)

Submission status: Accepted

Solution code:
a = int(input())
def is_even(a):
    return a%2 == 0
if is_even(a):
    print((a/2)/a)
else:
    print(((a + 1)/2)/a)

Submission status: Accepted

Solution code:
import math

N = int(input())

print( math.ceil(N/2)/N )

Submission status: Accepted

Solution code:
N = int(input())
ans = 0

if N%2 == 0 :
	print(0.5)
elif N == 1:
	print(1)
else :
	ans = (N+1)/2/N
	print(ans)

Submission status: Accepted

Solution code:
n=int(input())
print(((n>>1)+1)/n if n & 1 == 1 else 0.5)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 1:
  print(((N-1)/2.0+1)/N)
else:
  print(0.5000000000)

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
import logging
import heapq
logging.basicConfig(level=logging.DEBUG)

input = sys.stdin.readline

setrecursionlimit(1000000)

MOD = 10**9+7

def main():
    N=int(input())
    odd=0
    for i in range(1,N+1):
        if i % 2 == 1:
            odd+=1
    print(odd*1.0/N)
main()

Submission status: Accepted

Solution code:
n = float(input())

if n % 2 == 0:
  print("{:.10g}".format((n/2)/n))
elif n % 2 != 0:
  print("{:.10g}".format( ((n+1)/2)/n) )

Submission status: Accepted

Solution code:
N = input()
N = int(N)
count = 0
for i in range(N):
    if (i+1) % 2 == 1:
        count += 1

print("{0: .10f}".format(count/N))

Submission status: Accepted

Solution code:
N = int(input())
K = -(-N // 2)
print(K / N)

Submission status: Accepted

Solution code:
n=int(input())
if(n%2==0):
  print(0.5)
else:
  print((n-int(n/2))/n)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    print(((n + 1) // 2) / n)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
num = N
if N % 2 == 1:
  num += 1
ki_num = num / 2
kaku_ritsu = ki_num / N
print('{:.10f}'.format(kaku_ritsu))

Submission status: Accepted

Solution code:
n=int(input())
if(n%2==0):print(0.5)
else:
    x=n//2+1
    print(x/n)

Submission status: Accepted

Solution code:
A = input()
N = int(A)


if N ==1:
    a = 1
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N%2 == 1:
    a = (N//2 + 1)/N

print(a)

Submission status: Accepted

Solution code:
a = int(input())
b = 0
ans = 0
if a % 2 != 0:
  b = a / 2 + 0.5
  ans = b / a

else:
  b = a /2
  ans = b / a

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
  print(1 / 2)
else:
  print((N // 2 + 1) / N)

Submission status: Accepted

Solution code:
import sys
import math
N = int(sys.stdin.readline())
# import decimal


odd = []
oddness = []


for i in range(N):
    j = i + 1
    if j % 2 != 0:
        odd.append(j)

# decimal.getcontext().prec = 7
# print(decimal.Decimal(len(odd)) / decimal.Decimal(j))
answer = float(len(odd)) / float(j)
print(answer)

Submission status: Accepted

Solution code:
N = int(input())

a = 0
for i in range(N):
  if (i + 1 ) % 2 == 1:
    a += 1

print(a/N)

Submission status: Accepted

Solution code:
N = int(input())
if N == 1:
  print(1)
elif N // 2 * 2 == N:
  print(0.5)
else:
  print((N//2+1)/N)

Submission status: Accepted

Solution code:
N = int(input())
if N%2==0:
    print((N/2)/N)
else:
    print(((N//2)+1)/N)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
    print(1 / 2)
else:
    print((((n - 1) / 2) + 1) / n)

Submission status: Accepted

Solution code:
N = [int(x) for x in raw_input().split(' ')][0]
half = N / 2
print((N-half) * 1.0 / N)

Submission status: Accepted

Solution code:
# coding: utf-8

num = int(input())

if num%2 == 0:
    print(num/2/num)
else:
    print((num+1)/2/num)

Submission status: Accepted

Solution code:
n = int(input())
odd_cnt= len([a for a in range(n+1) if a%2==1])

prob= (odd_cnt)/float(n)

print (prob)

Submission status: Accepted

Solution code:

N = int(input())

print((N + 1) // 2 / N)

Submission status: Accepted

Solution code:
a = int(input())

if a%2==0:
  ans = (a/2)/a

if a%2==1:
  ans = (a+1)/2/a

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
    print(0.500000)
elif n==1:
    print("1")
else:
    b=(n-1)/2+1
    print(b/n)

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0:
    print("0.500000")

else:
    print(round((N + 1) / (2 * N), 6))

Submission status: Accepted

Solution code:
N = int(input())

even = N // 2 if N % 2 == 0 else int(N / 2) + 1
print(even / N)

Submission status: Accepted

Solution code:
x = int(input())
a = None

if x%2==0:
    a = 1/2
else:
    a = (x+1)/(2*x)

print(a)

Submission status: Accepted

Solution code:
n = int(input())
print((n//2 + n%2)/n)

Submission status: Accepted

Solution code:
N = int(input())
num = 0
for i in range(1,N+1):
  if i%2==1:
    num += 1
print(float(num/N))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N= input()
N = int(N)
x = -( - N // 2) / N
print(x)

Submission status: Accepted

Solution code:
import math
N=int(input())
if N%2==0:
    print((N/2)/N) 
elif N==1:
    print(N/N)
else:
    round_number=math.ceil(N/2)
    print(round_number/N)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2:
    print(-(-n//2) / n)
else:
    print((n//2) / n)

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
    ans = 0.5
else:
    ans = ((n-1)/2 + 1)/n

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import os

#x,y,z = [int(i) for i in input().split(' ')]

n = float(input())

if n % 2 == 1:
    #奇数
    print((n // 2 + 1) / n)
else:
    #偶数
    print(1.0/2.0)

Submission status: Accepted

Solution code:
import math
n = int(input())

f = math.ceil(n/2)

print(f/n)

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
  print(1/2)
else:
  print((n+1)/2/n)

Submission status: Accepted

Solution code:
#N:整数,P:求める確率

N=int(input())
if N%2==0:
    P=0.5
else:
    n=N//2
    P=(N-n)/N
print(P)

Submission status: Accepted

Solution code:
import math
N=int(input())
print(math.ceil(N/2) / N)

Submission status: Accepted

Solution code:
n = int(input())
print(((n//2)+ int(n&1))/n)

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(arg: str) -> str:
    N = int(arg)
    return str(int((N+1) / 2) / N)


if __name__ == "__main__":
    print(solve(input()))

Submission status: Accepted

Solution code:
a=int(input())
print(-((a*-1)//2)/a)

Submission status: Accepted

Solution code:
N=int(input())
onum=len(list(filter(lambda x: x%2!=0, [i+1 for i in range(N)])))
print("{:.10f}".format(onum/N))

Submission status: Accepted

Solution code:
n = int(input())
count = 0
for i in range(1, n+1):
    if i % 2 == 1:
        count += 1

print('{:.10f}'.format(count/n))

Submission status: Accepted

Solution code:
N = int(input())
odd = 0
for i in range(1, N + 1):
  if i % 2 != 0:
    odd += 1
ans = odd / N
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

count = 0
for i in range(1,N+1):
    if i%2 != 0:
        count += 1
        
print('{:.10f}'.format(count/N))

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
    print(1/2)
else:
    print((N//2+1)/N)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
n = int(input())
if (n % 2) == 0:
    print('{0:.10f}'.format(0.500000000))
    sys.exit()

ans = (n // 2 + 1) / n
print('{0:.10f}'.format(ans))

Submission status: Accepted

Solution code:
n = int(input())

if n == 1:
    print('1.0')
elif n % 2 == 1:
    
    #odd
    b = n // 2 + 1
    print (b/n)
else:
    print ('0.5')

Submission status: Accepted

Solution code:
str = input()

num = int(str)

c = 0.0

for i in range(num + 1):
    if i % 2 != 0:
        c += 1

print(c / num)

Submission status: Accepted

Solution code:
n=int(input())
if(n%2==0):
    print('0.5')
else:
    print('{0}'.format(0.5+1/(2*n)))

Submission status: Accepted

Solution code:
n = int(input())
if n == 1:
    print(1)
elif n % 2 == 0:
    print(0.5)
else:
    odds = n // 2 + 1
    print(odds/n)

Submission status: Accepted

Solution code:
n = int(input())

cnt = 0
for i in range(1,n+1):
    if i%2 == 1:
        cnt += 1

print(cnt/n)

Submission status: Accepted

Solution code:
N = int(input())
odd = 0
same = 0
for x in range(1,N+1,1):
  if x % 2 == 0:
    same += 1
  else:
    odd += 1
print(odd / (odd + same))

Submission status: Accepted

Solution code:
n=int(input())

cnt=0
for i in range(1, n+1):
    if i % 2 != 0:
        cnt+=1
        
print(cnt/n)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0.0
if n%2==1:
    ans = ((n//2)+1) / n
else:
    ans = 1.0/2.0
print(ans)

Submission status: Accepted

Solution code:
x=int(input())
y=x//2
z=x-y
print(z/x)

Submission status: Accepted

Solution code:
N = int(input())

if N == 1:
  print(1)
elif N % 2 == 1:
  print(((N-1)/2+1)/N)
elif N % 2 == 0:
  print(1/2)

Submission status: Accepted

Solution code:
import random
n = int(input())
x = random.randint(1,n)
if n % 2 ==0:
  print(0.5)
else:
  count = n//2
  print((n-count)/n)

Submission status: Accepted

Solution code:
N = float(input())
print(((N+1)//2)/N)

Submission status: Accepted

Solution code:
num=int(input())
if(num%2==0):
    ans=0.5
    print("%.6f"%ans)
else:
    ans=(num+1)/2
    ans/=num
    print("%.6f"%ans)

Submission status: Accepted

Solution code:
# -*- coding: UTF-8 -*-

N = int(input())
count = 0
for a in range(1, N+1):
  if a % 2 != 0:
  	count += 1
print('{}'.format(count/N))