import java.io.*;
import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt(), c=1, f;
        int[] u=new int[n+1]; u[0]=1;
        while (u[c]!=1)
        {
            u[c]=1; c<<=1; if (c>=n) c-=n;
        }
        BigInteger a, b, m, x, A, B, X;
        a=BigInteger.ZERO;
        b=BigInteger.ZERO;
        m=BigInteger.ONE;
        x=BigInteger.ONE;
        if (n==1)
        {
        }
        else if (n==2)
        {
            a=BigInteger.ONE;
        }
        else if (c==0)
        {
            c=1;
            while (c!=0)
            {
                c*=2;
                if (c<=n)
                {
                    a=a.add(m);
                    if (c==n) c-=n;
                }
                else
                {
                    a=a.add(m);
                    a=a.multiply(BigInteger.valueOf(c));
                    x=x.multiply(BigInteger.valueOf(c));
                    c-=n;
                    m=m.multiply(BigInteger.valueOf(c));
                }
            }
            m=a.gcd(x);
            a=a.divide(m);
            x=x.divide(m);
        }
        else
        {
            f=c;
            do
            {
                c*=2;
                if (c<=n)
                {
                    a=a.add(m);
                    if (c==n) c-=n;
                }
                else
                {
                    a=a.add(m);
                    a=a.multiply(BigInteger.valueOf(c));
                    x=x.multiply(BigInteger.valueOf(c));
                    c-=n;
                    m=m.multiply(BigInteger.valueOf(c));
                }
            }
            while (f!=c);
            x=x.subtract(m);
            m=a.gcd(x);
            a=a.divide(m);
            x=x.divide(m);
            A=a;
            B=b;
            X=x;
            a=BigInteger.ZERO;
            b=BigInteger.ZERO;
            m=BigInteger.ONE;
            x=BigInteger.ONE;
            c=1;
            while (c!=f)
            {
                c*=2;
                if (c<=n)
                {
                    a=a.add(m);
                    if (c==n) c-=n;
                }
                else
                {
                    a=a.add(m);
                    a=a.multiply(BigInteger.valueOf(c));
                    x=x.multiply(BigInteger.valueOf(c));
                    c-=n;
                    m=m.multiply(BigInteger.valueOf(c));
                }
            }
            x=x.multiply(X);
            a=a.multiply(X).add(A.multiply(m));
            m=a.gcd(x);
            a=a.divide(m);
            x=x.divide(m);
        }
        System.out.println(a.toString()+"/"+x.toString());
    }
}

import java.math.BigInteger;
import java.util.Scanner;
import java.io.PrintWriter;

public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		int n2 = 0;
		while (n % 2 == 0) {
			n >>= 1;
			++n2;
		}
		if (n == 1) {
			out.print(n2+"/1");
			out.close();
			return;
		}
		Fraction A = new Fraction(BigInteger.ZERO, BigInteger.ONE);
		Fraction B = new Fraction(BigInteger.ONE, BigInteger.ONE);
		for (int i=1,k=0,cnt=0; ; ++cnt) {
			for (k=0; (i<<k)<n; ++k);
			int rem = (i << k) - n;
			A = A.add(B.multiply(k));
			B = B.multiply(rem);
			B.b = B.b.shiftLeft(k).multiply(BigInteger.valueOf(i));
			if (rem == 1) {
				B.a = B.b.subtract(B.a);
				A = A.divide(B);
				break;
			}
			i = rem;
			if (cnt > 20) {
				A.reduce();
				B.reduce();
				cnt = 0;
			}
		}
		A.a = A.a.add(A.b.multiply(BigInteger.valueOf(n2)));
		A.reduce();
		out.print(A.a+"/"+A.b);
		out.close();
	}
}

class Fraction {
	public BigInteger a, b;
	public Fraction(BigInteger a, BigInteger b) {
		this.a = a;
		this.b = b;
//		reduce();
	}
	public Fraction add(Fraction rhs) {
		BigInteger d = this.b.gcd(rhs.b);
		BigInteger y = this.b.divide(d).multiply(rhs.b);
		BigInteger x = this.a.multiply(y.divide(this.b)).add(rhs.a.multiply(y.divide(rhs.b)));
		return new Fraction(x, y);
	}
	public Fraction multiply(Fraction rhs) {
		BigInteger arb = this.a.gcd(rhs.b);
		BigInteger bra = this.b.gcd(rhs.a);
		BigInteger x = this.a.divide(arb).multiply(rhs.a.divide(bra));
		BigInteger y = this.b.divide(bra).multiply(rhs.b.divide(arb));
		return new Fraction(x, y);
	}
	public Fraction multiply(long rhs) {
		BigInteger r = BigInteger.valueOf(rhs);
		BigInteger d = r.gcd(this.b);
		r = r.divide(d);
		return new Fraction(this.a.multiply(r), this.b.divide(d));
	}
	public Fraction divide(Fraction rhs) {
		Fraction r = new Fraction(rhs.b, rhs.a);
		return this.multiply(r);
	}
	public void reduce() {
		BigInteger d = this.a.gcd(b);
		this.a = this.a.divide(d);
		this.b = this.b.divide(d);
	}
}

import java.math.BigInteger;
import java.util.Scanner;

public class B implements Runnable {
	public static final double eps = 1e-6;

	public static void main(String[] args) {
		new Thread(null, new B(), "Solver", 1L << 26).start();
	}

	public void run() {
		Scanner scan = new Scanner(System.in);
		seen = new boolean[10_001];
		cycleEntry = -1;

		long n = scan.nextLong();
		if (n == 1) {
			System.out.println("0/1");
			return;
		}
		Fraction ans = solve((int) n, 1).l;
		ans.reduce();
		System.out.println(ans);
	}

	static BigInteger gcd(BigInteger a, BigInteger b) {
		if (b.equals(BigInteger.ZERO))
			return a;
		return gcd(b, a.mod(b));
	}

	static BigInteger lcm(BigInteger a, BigInteger b) {
		return a.divide(gcd(a, b)).multiply(b);
	}

	static class Fraction {
		BigInteger a, b;

		public Fraction(BigInteger a, BigInteger b) {
			this.a = a;
			this.b = b;
			if(Math.random() < .001)
				this.reduce();
		}

		public Fraction(long a, long b) {
			this(BigInteger.valueOf(a), BigInteger.valueOf(b));
		}

		public void reduce() {
			BigInteger gcd = gcd(a, b);
			a = a.divide(gcd);
			b = b.divide(gcd);
		}

		public Fraction add(Fraction f) {
			BigInteger cd = lcm(b, f.b);

			return new Fraction(cd.divide(b).multiply(a).add(cd.divide(f.b).multiply(f.a)), cd);
		}

		public Fraction multiply(Fraction f) {
			return new Fraction(a.multiply(f.a), b.multiply(f.b));
		}

		public String toString() {
			return a + "/" + b;
		}
	}

	static int cycleEntry;
	static boolean[] seen;

	static Pair solve(int n, int k) {
		int state = k;
		if (k == 0) {
			return new Pair(new Fraction(0, 1), new Fraction(0, 1));
		}
		if (seen[state]) {
			cycleEntry = k;
			return new Pair(new Fraction(0, 1), new Fraction(1, 1));
		}
		seen[state] = true;
		int lg = Integer.highestOneBit((n + k - 1) / k);
		if (lg == (n + k - 1) / k)
			lg = Integer.numberOfTrailingZeros(lg);
		else
			lg = Integer.numberOfTrailingZeros(lg) + 1;
		k *= (1 << lg);
		Pair next = solve(n, k - n);
		Fraction f = new Fraction(k - n, k);
		Pair ans = next.multiply(f).add(new Fraction(lg, 1));
		if (state == cycleEntry) {
			// System.out.println("found recurrence, T(" + state +") = " + ans.l
			// + " + " + ans.r + " * T(" + state + ")" );
			return new Pair(ans.l.multiply(new Fraction(ans.r.b, ans.r.b.subtract(ans.r.a))), new Fraction(0, 1));
		}
		return ans;
	}

	static class Pair {
		Fraction l, r;

		public Pair(Fraction l, Fraction r) {
			this.l = l;
			this.r = r;
		}

		public Pair add(Fraction f) {
			return new Pair(l.add(f), r);
		}

		public Pair multiply(Fraction f) {
			return new Pair(l.multiply(f), r.multiply(f));
		}

		@Override
		public String toString() {
			return "(" + l + "," + r + ")";
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		BigInteger n = new BigInteger(bf.readLine().trim());
		int in = n.intValue(), L = 0;
		while((in&1) == 0) {
			in>>=1; L++;
		}
		if (in==1) { System.out.printf("%d/1\n", L); return ;}
		n = new BigInteger(String.valueOf(in));
		BigInteger s = BigInteger.ONE, t = BigInteger.ONE, two = new BigInteger("2");
		int m = 0;
		for(int i=0;i<in;i++) {
			s = s.multiply(two);
			t = t.multiply(two).mod(n);
			if (t.equals(BigInteger.ONE)) {
				m = i+1; break;
			}
		}
		t = s.multiply(n);
		BigInteger r = s, ans = BigInteger.ZERO;
		int i = L;
		while(r.compareTo(BigInteger.ONE) > 0) {
			i++; t=t.divide(two);
			if (r.compareTo(t) > 0) {
				r = r.subtract(t);
				ans = ans.add(t.multiply(new BigInteger(String.valueOf(i))));
			}
		}
		ans = ans.add(new BigInteger(String.valueOf(m)));
		s = s.subtract(BigInteger.ONE);
		BigInteger d = ans.gcd(s);
		System.out.printf("%s/%s\n", ans.divide(d), s.divide(d));
	}
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.Scanner;
import java.io.*;
import java.util.StringTokenizer;
import java.math.RoundingMode;
/**
 *
 * @author Макар
 */

public class Main {
    class Fraction
{
    private BigInteger ch,zn;
    Fraction()
    {
        ch = BigInteger.ZERO;
        zn = BigInteger.ONE;
    }
    Fraction(BigInteger x)
    {
        ch = x;
        zn = BigInteger.ONE;
    }
    Fraction(BigInteger x,BigInteger y)
    {
        //BigInteger g = x.gcd(y);
        ch = x;//.divide(g);
        zn = y;//.divide(g);
    }
    Fraction(int x,int y)
    {
        ch = BigInteger.valueOf(x);
        zn = BigInteger.valueOf(y);
        //BigInteger g = ch.gcd(zn);
        //ch = ch.divide(g);
        //zn = zn.divide(g);
    }
    Fraction(Fraction x)
    {
        ch = x.ch;
        zn = x.zn;
    }
    public Fraction relax()
    {
        //BigInteger g = ch.gcd(zn);
        return new Fraction(ch, zn);
    }
    public Fraction add(Fraction x)
    {
        //BigInteger g = zn.gcd(x.zn);
        BigInteger nok = zn.multiply(x.zn);
        Fraction res = new Fraction();
        res.zn = nok;
        res.ch = res.ch.add(ch.multiply(nok.divide(zn)));
        res.ch = res.ch.add(x.ch.multiply(nok.divide(x.zn)));
        return res.relax();
    }
    public Fraction sub(Fraction x)
    {
        //BigInteger g = zn.gcd(x.zn);
        BigInteger nok = zn.multiply(x.zn);
        Fraction res = new Fraction();
        res.zn = nok;
        res.ch = res.ch.add(ch.multiply(nok.divide(zn)));
        res.ch = res.ch.subtract(x.ch.multiply(nok.divide(x.zn)));
        return res.relax();
    }
    public Fraction multiply(Fraction x)
    {
        Fraction res = new Fraction(x);
        res.ch = res.ch.multiply(ch);
        res.zn = res.zn.multiply(zn);
        return res.relax();
    }
    public Fraction divide(Fraction x)
    {
        return (this).multiply(x.inverse());
    }
    public Fraction inverse()
    {
        return new Fraction(zn,ch);
    }
    public Fraction ONE()
    {
        return new Fraction(BigInteger.ONE,BigInteger.ONE);
    }
    public void write()
    {
        BigInteger g = ch.gcd(zn);
        ch = ch.divide(g);
        zn = zn.divide(g);
        Main.out.write(ch.toString() + "/" + zn.toString() + "\n");
    }
}
    Scanner sc;
    static PrintWriter out;
    static BufferedReader in;
    static StringTokenizer st;
    int n;
    Fraction mul[];
    Fraction ans[];
    int used[];
    Fraction DP(int x, Fraction toMul)
    {
        if (used[x] == 1)
        {
            used[x]=2;
            mul[x] = toMul;
            return new Fraction();
        }
        used[x]=1;
        int k = 0;
        int t = x;
        while (t < n)
        {
            t*=2;
            k++;
        }
        Fraction res = new Fraction(BigInteger.valueOf(k));
        if (t - n > 0)
        {
            Fraction m1 = new Fraction(t - n, t);
            res = res.add(
                    DP(t - n,toMul.multiply(m1)).multiply(m1));
            if (used[x] == 2)
            {
                Fraction hint = mul[x].divide(toMul);
                res = res.divide(new Fraction(1,1).sub(hint));
            }
        }
        return res;
    }
    private void Solve()
    {
        n = nextint();
        mul = new Fraction[16384];
        used = new int[16384];
        ans = new Fraction[16384];
        Fraction res = DP(1,new Fraction(BigInteger.ONE,BigInteger.ONE));
        res.write();
        //BigDecimal dc = new BigDecimal(res.ch);
        //dc = dc.divide(new BigDecimal(res.zn), 10,RoundingMode.HALF_UP);
        //out.print(dc.toPlainString());
    }
    public static void main(String[] args) {
        //out = new PrintWriter("test.out");
        //in = new BufferedReader(new FileReader("test.in"));
        out = new PrintWriter(System.out);
        in = new BufferedReader(new InputStreamReader(System.in));
        new Main().Solve();
        out.close();
    }
    String ns()
    {
        try
        {
            if(st == null || !st.hasMoreTokens())
            {
                st = new StringTokenizer(in.readLine());
            }
            return st.nextToken();
        }
        catch(Exception e)
        {
            return null;
        }
    }

    int nextint()
    {
        return Integer.valueOf(ns());
    }

    long nextlong()
    {
        return Long.valueOf(ns());
    }

    double nextdouble()
    {
        return Double.valueOf(ns());
    }

    BigInteger nextbigint()
    {
        return new BigInteger(ns());
    }

    String nextline()
    {
        st = null;
        try {
            return in.readLine();
        } catch (Exception e) {
            return null;
        }
    }
}

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

    public class Main {

        PrintWriter writer;
        Scanner reader;
        int n;
        public Main(){
            writer=new PrintWriter(System.out);
            reader = new Scanner(System.in);
            n=reader.nextInt();
            reader.close();
        }

        public void solve(){

            int offset=0;
            while(n%2==0){
                offset++;
                n>>>=1;
            }
            if(n==1){
                writer.println(offset+"/"+1);
                writer.close();
                return;
            }

            int d,exp, delta=1;
            ArrayList<Integer>delta_factor=new ArrayList<Integer>();
            ArrayList<Integer>alpha_factor=new ArrayList<Integer>();
            ArrayList<Integer>exp_factor=new ArrayList<Integer>();
            BigInteger df=BigInteger.ONE;
            BigInteger deltaf=BigInteger.ONE;
            int cycle=0;

            do{
                exp=(int) (Long.highestOneBit(n/delta)<<1);
                d=delta*exp;
                df=df.multiply(BigInteger.valueOf(d));
                delta_factor.add(delta);
                deltaf=deltaf.multiply(BigInteger.valueOf(delta));
                delta=exp*delta-n;
                alpha_factor.add(Integer.numberOfTrailingZeros(exp));
                cycle++;
            }while(delta>1);

            exp_factor.add(alpha_factor.get(cycle-1));
            for(int i=cycle-2;i>=0;i--){
                exp_factor.add(exp_factor.get(cycle-2-i)+alpha_factor.get(i));
            }
            Collections.reverse(exp_factor);

            ArrayList<BigInteger>ni=new ArrayList<BigInteger>();
            BigInteger num=BigInteger.ZERO;

            for(int i=0; i<cycle;i++){
                BigInteger temp=BigInteger.ONE;
                temp=temp.shiftLeft(exp_factor.get(i));
                temp=temp.multiply(BigInteger.valueOf(alpha_factor.get(i)));
                if(i>0)
                    temp=temp.multiply(BigInteger.valueOf(delta_factor.get(i)));
                ni.add(temp);
            }

            for(BigInteger i:ni){
                num=num.add(i);
            }
            num=num.multiply(deltaf);
            BigInteger den=df.subtract(deltaf);
            num=num.add(BigInteger.valueOf(offset).multiply(den));
            BigInteger res=num.gcd(den);

            writer.println(num.divide(res)+"/"+den.divide(res));
            writer.close();

        }

        public static void main(String[] args) {
            Main m=new Main();
            m.solve();
        }

        ///////////////////////////////////////////////////////////////////////
        ///                                                                 ///
        ///                 BONUS : CHOOSE METHOD                           ///
        ///                                                                 ///
        ///////////////////////////////////////////////////////////////////////
        public int choose(int n, long prerandom, long maxrandom){
            if(n==1)
                return 0;
            if(n%2==0)
                return choose(n/2, 1, 1)+(flip()?n/2:0);

            int alpha=0;
            long exp=1;
            exp=Long.highestOneBit(n/maxrandom)<<1;
            alpha=Long.numberOfTrailingZeros(exp);
            int m=0;
            int e=1;
            for(int i=0;i<alpha;i++){
                if(flip())
                    m+=e;
                e*=2;
            }
            m+=((prerandom-1)*exp);
            if(m<n)
                return m;
            return choose(n,m-n+1,exp*maxrandom-n);
        }

        public int flip=0;
        public boolean  flip(){
            flip++;
            return(Math.random()<0.5);
        }
        public int reset(){
            int swap=flip;
            flip=0;
            return swap;
        }
        ///////////////////////////////////////////////////////////////////////////

    }

import java.io.*;
import java.math.*;
import java.util.*;
public class Main
{
    class Fraction
    {
        private BigInteger numerator,denominator;
        Fraction()
        {
            numerator=BigInteger.ZERO;
            denominator=BigInteger.ONE;
        }
        Fraction(BigInteger x)
        {
            numerator=x;
            denominator=BigInteger.ONE;
        }
        Fraction(int x)
        {
            numerator=BigInteger.valueOf(x);
            denominator=BigInteger.ONE;
        }
        Fraction(BigInteger x,BigInteger y)
        {
            numerator=x;
            denominator=y;
        }
        Fraction(int x,int y)
        {
            numerator=BigInteger.valueOf(x);
            denominator=BigInteger.valueOf(y);
        }
        Fraction(Fraction x)
        {
            numerator=x.numerator;
            denominator=x.denominator;
        }
        public Fraction add(Fraction x)
        {
            return new Fraction(numerator.multiply(x.denominator).add(x.numerator.multiply(denominator)),denominator.multiply(x.denominator));
        }
        public Fraction subtract(Fraction x)
        {
            return new Fraction(numerator.multiply(x.denominator).subtract(x.numerator.multiply(denominator)),denominator.multiply(x.denominator));
        }
        public Fraction multiply(Fraction x)
        {
            return new Fraction(numerator.multiply(x.numerator),denominator.multiply(x.denominator));
        }
        public Fraction divide(Fraction x)
        {
            return new Fraction(numerator.multiply(x.denominator),denominator.multiply(x.numerator));
        }
        public void write()
        {
            BigInteger g=numerator.gcd(denominator);
            Main.writer.println(numerator.divide(g).toString()+"/"+denominator.divide(g).toString());
        }
    }
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    static PrintWriter writer;
    Fraction f[];
    int g[];
    int n;
    Fraction ff(int x,Fraction m)
    {
        if(g[x]==1)
        {
            g[x]=2;
            f[x]=m;
            return new Fraction();
        }
        g[x]=1;
        int k=0;
        int t=x;
        while(t<n)
        {
            t*=2;
            k++;
        }
        Fraction r=new Fraction(k);
        if(t>n)
        {
            Fraction m1=new Fraction(t-n,t);
            r=r.add(ff(t-n,m.multiply(m1)).multiply(m1));
            if(g[x]==2)
            {
                r=r.divide(new Fraction(1).subtract(f[x].divide(m)));
            }
        }
        return r;
    }
    public void solve() throws IOException
    {
        n=nextInt();
        f=new Fraction[10010];
        g=new int[10010];
        ff(1,new Fraction(1,1)).write();
    }
    public void run() throws IOException
    {
        reader=new BufferedReader(new InputStreamReader(System.in));
        writer=new PrintWriter(System.out);
        solve();
        reader.close();
        writer.close();
    }
    public static void main(String[] args) throws IOException
    {
        new Main().run();
    }
    int nextInt() throws IOException
    {
        return Integer.parseInt(nextToken());
    }
    String nextToken() throws IOException
    {
        while(tokenizer==null||!tokenizer.hasMoreTokens())
        {
            tokenizer=new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.math.*;

public class Solution
{
    public static class Frac
    {
        BigInteger numer, denom;
        Frac () { numer = BigInteger.ZERO; denom = BigInteger.ONE; }
        Frac (BigInteger num, BigInteger den) { numer = num; denom = den; }
    }

    static int n, sza;
    static int idx[], a[];
    static Frac k[], b[], d[];
    static long stTime;

    public static Frac multFrac (Frac a, Frac b)
    {
        BigInteger g1 = a.numer.gcd(b.denom), g2 = a.denom.gcd(b.numer);
        return new Frac(a.numer.divide(g1).multiply(b.numer.divide(g2)), a.denom.divide(g2).multiply(b.denom.divide(g1)));
    }

    public static Frac norm (Frac a)
    {
        BigInteger g = a.numer.gcd(a.denom);
        return new Frac(a.numer.divide(g), a.denom.divide(g));
    }

    public static Frac addFrac (Frac a, Frac b)
    {
        BigInteger lcm = a.denom.divide(a.denom.gcd(b.denom)).multiply(b.denom);
        BigInteger num = a.numer.multiply(lcm.divide(a.denom)).add(b.numer.multiply(lcm.divide(b.denom)));

        return new Frac(num, lcm);

        /*
        BigInteger num = a.numer.multiply(b.denom).add(b.numer.multiply(a.denom));
        BigInteger den1 = a.denom, den2 = b.denom;
        BigInteger g1 = num.gcd(den1);
        num = num.divide(g1);
        den1 = den1.divide(g1);
        BigInteger g2 = num.gcd(den2);
        num = num.divide(g2);
        den2 = den2.divide(g2);

        return new Frac(num, den1.multiply(den2));
        */
    }

    static Frac solve ()
    {
        int cnt = 1;
        int fcalc = -1;

        while (true)
        {
            a[sza] = cnt;
            idx[cnt] = sza;

            int h = 0;
            while ((cnt << h) < n)
                h++;

            int rem = (cnt << h) - n;

            if (rem == 0)
            {
                d[sza] = new Frac(BigInteger.valueOf(h), BigInteger.ONE);
                fcalc = sza;
                break;
            }

            b[sza] = new Frac(BigInteger.valueOf(h), BigInteger.ONE);
            k[sza] = new Frac(BigInteger.valueOf(rem), BigInteger.valueOf(cnt << h));

            if (idx[rem] != -1)
            {
                Frac curb = b[sza], curk = k[sza];

                for (int i = sza - 1; i >= idx[rem]; i--)
                {
                    Frac nb = addFrac(b[i], multFrac(curb, k[i]));
                    Frac nk = multFrac(curk, k[i]);
                    curb = nb; curk = nk;
                }

                d[idx[rem]] = multFrac(new Frac(curk.denom, curk.denom.subtract(curk.numer)), curb);

                fcalc = idx[rem];
                break;
            }
            sza++;
            cnt = rem;
        }

        Frac cur = d[fcalc];
        for (int i = fcalc - 1; i >= 0; i--)
            cur = addFrac(b[i], multFrac(k[i], cur));

        cur = norm(cur);

        return cur;
    }

    public static void main (String[] argv)
    {
        Scanner in = new Scanner (System.in);
        n = in.nextInt();
        stTime = System.currentTimeMillis();
        idx = new int [n + 5];
        for (int i = 0; i <= n; i++)
            idx[i] = -1;
        a = new int [n + 5];
        sza = 0;
        k = new Frac [n + 5];
        b = new Frac [n + 5];
        d = new Frac [n + 5];

        Frac ans = solve();
        //System.out.println(System.currentTimeMillis() - stTime);

        System.out.println(ans.numer + "/" + ans.denom);
    }
}

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    static int n;
    static Fraction[] memo = new Fraction[100100];
    static boolean[] vis = new boolean[100100];

    static Fraction DP(int root, long depth) {
        int n2 = 0;
        while (n % 2 == 0) {
            n >>= 1;
            ++n2;
        }
        if (n == 1) {
            return new Fraction(n2, 1);
        }
        Fraction A = new Fraction(0, 1);
        Fraction B = new Fraction(1, 1);
        int lastRem = 1;
        int cnt = 0;
        while (root != 0) {
            int k;
            for (k = 0; (lastRem << k) < n; k++);
            int rem = (lastRem << k) - n;
            A = A.add(B.multiply(k));
            B = B.multiply(rem);
            B.b = B.b.shiftLeft(k).multiply(BigInteger.valueOf(lastRem));
            if (rem == 1) {
                B.a = B.b.subtract(B.a);
                A = A.devide(B);
                break;
            }
            lastRem = rem;
            cnt++;
            if (cnt % 30 == 0) {
                A.reduce();
                B.reduce();
            }
        }
        A.a = A.a.add(A.b.multiply(BigInteger.valueOf(n2)));
        return A;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        if (n == 0) {
            System.out.println("0/1");
            return;
        }
        Fraction ans = DP(1, 0);
        ans.reduce();
        PrintWriter out = new PrintWriter(System.out);
        out.print(ans.a + "/" + ans.b);
        out.close();
    }
}

class Fraction {

    BigInteger a = new BigInteger("0");
    BigInteger b = new BigInteger("1");

    Fraction() {

    }

    Fraction(long a, long b) {
        this.a = new BigInteger("" + a);
        this.b = new BigInteger("" + b);
    }

    Fraction(BigInteger a, BigInteger b) {
        this.a = a;
        this.b = b;
    }

    Fraction add(BigInteger x) {
        Fraction ans = new Fraction(a, b);
        ans.a = ans.a.add(x.multiply(b));
        return ans;
    }

    Fraction multiply(BigInteger x) {
        Fraction ans = new Fraction(this.a, this.b);
        ans.a = ans.a.multiply(x);
        return ans;
    }

    Fraction add(long rhs) {
        BigInteger r = BigInteger.valueOf(rhs);
        BigInteger d = r.gcd(this.b);
        r = r.divide(d);
        return new Fraction(this.a.multiply(r), this.b.divide(d));
    }

    Fraction multiply(long x) {
        BigInteger bx = new BigInteger("" + x);
        Fraction ans = multiply(bx);
        return ans;
    }

    Fraction add(Fraction rhs) {
        BigInteger d = this.b.gcd(rhs.b);
        BigInteger y = this.b.divide(d).multiply(rhs.b);
        BigInteger x = this.a.multiply(y.divide(this.b)).add(rhs.a.multiply(y.divide(rhs.b)));
        return new Fraction(x, y);
    }

    Fraction multiply(Fraction rhs) {
        BigInteger arb = this.a.gcd(rhs.b);
        BigInteger bra = this.b.gcd(rhs.a);
        BigInteger x = this.a.divide(arb).multiply(rhs.a.divide(bra));
        BigInteger y = this.b.divide(bra).multiply(rhs.b.divide(arb));
        return new Fraction(x, y);
    }

    Fraction devide(Fraction x) {
        Fraction y = new Fraction(x.b, x.a);
        Fraction ans = multiply(y);
        return ans;
    }

    BigInteger GCD(BigInteger a, BigInteger b) {
        for (;;) {
            if (a.equals(BigInteger.ZERO)) {
                return b;
            }
            b = b.mod(a);
            if (b.equals(BigInteger.ZERO)) {
                return a;
            }
            a = a.mod(b);
        }
    }

    void reduce() {
        BigInteger G = a.gcd(b);
        a = a.divide(G);
        b = b.divide(G);
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int head = n, L = 0;
            while ((head & 1) == 0) {
                head >>= 1;
                L++;
            }
            if (head == 1) {
                out.println(L + "/1");

            } else {
                BigInteger headBig = new BigInteger(String.valueOf(head));
                BigInteger s = BigInteger.ONE, t = BigInteger.ONE, two = new BigInteger("2");
                int m = 0;
                for (int i = 0; i < head; i++) {
                    s = s.multiply(two);
                    t = t.multiply(two).mod(headBig);
                    if (t.equals(BigInteger.ONE)) {
                        m = i + 1;
                        break;
                    }
                }
                t = s.multiply(headBig);
                BigInteger r = s, ans = BigInteger.ZERO;
                int i = L;
                while (r.compareTo(BigInteger.ONE) > 0) {
                    i++;
                    t = t.divide(two);
                    if (r.compareTo(t) > 0) {
                        r = r.subtract(t);
                        ans = ans.add(t.multiply(new BigInteger(String.valueOf(i))));
                    }
                }
                ans = ans.add(new BigInteger(String.valueOf(m)));
                s = s.subtract(BigInteger.ONE);
                BigInteger d = ans.gcd(s);
                out.println(ans.divide(d) + "/" + s.divide(d));
            }
        }

    }

    static class InputReader {
        private StringTokenizer tokenizer;
        private BufferedReader reader;

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
    public static void main(String args[]) throws Exception
    {
        Scanner cin=new Scanner(System.in);
        int[] use=new int[10010];
        while (cin.hasNext())
        {
            int n=cin.nextInt();
            if (n==1)
            {
                System.out.println("0/1");
                continue;
            }
            for (int i=0;i<=n;i++)
                use[i]=0;
            int depth=0,now=1;
            while (now!=0&&use[now]==0)
            {
                use[now]=depth+1;
                now=(now*2)%n;
                depth++;
            }
            BigInteger a1,b1;
            for (int i=0;i<=n;i++)
                use[i]=0;
            boolean cir=false;
            int pos=now;
            depth=0; now=1;
            BigInteger tfz,tfm,ansfz1,ansfm1,ansfz2,ansfm2;
            tfz=tfm=ansfm1=ansfm2=BigInteger.valueOf(1);
            ansfz1=ansfz2=BigInteger.valueOf(0);
            while (now!=0&&use[now]==0)
            {
                use[now]=1;
                if (now==pos) cir=true;
                if (cir==false)
                {
                    BigInteger lcm=ansfm1.divide(ansfm1.gcd(tfm)).multiply(tfm);
                    ansfz1=ansfz1.multiply(lcm.divide(ansfm1)).add(tfz.multiply(lcm.divide(tfm)));
                    ansfm1=lcm;
                }
                else
                {
                    BigInteger lcm=ansfm2.divide(ansfm2.gcd(tfm)).multiply(tfm);
                    ansfz2=ansfz2.multiply(lcm.divide(ansfm2)).add(tfz.multiply(lcm.divide(tfm)));
                    ansfm2=lcm;
                }
                tfm=tfm.multiply(BigInteger.valueOf(now*2));
                tfz=tfz.multiply(BigInteger.valueOf((now*2)%n));
                BigInteger gg=tfm.gcd(tfz);
                if (gg.compareTo(BigInteger.valueOf(0))!=0)
                {
                    tfm=tfm.divide(gg);
                    tfz=tfz.divide(gg);
                }
                now=(now*2)%n;
            }
            b1=tfm.add(tfz.negate());
            a1=tfm;
            ansfz2=ansfz2.multiply(a1);
            ansfm2=ansfm2.multiply(b1);
            BigInteger lcm=ansfm1.divide(ansfm1.gcd(ansfm2)).multiply(ansfm2);
            ansfz1=ansfz1.multiply(lcm.divide(ansfm1)).add(ansfz2.multiply(lcm.divide(ansfm2)));
            ansfm1=lcm;
            BigInteger gg=ansfm1.gcd(ansfz1);
            if (gg.compareTo(BigInteger.valueOf(0))!=0)
            {
                ansfm1=ansfm1.divide(gg);
                ansfz1=ansfz1.divide(gg);
            }
            System.out.print(ansfz1);
            System.out.print("/");
            System.out.println(ansfm1);
        }
    }

}

import java.io.*;
import java.util.*;
import java.math.*;

public class D{
    static ArrayList<BigInteger> h, t, a, id;
    static TreeMap<BigInteger, Integer> cnt;
    static BigInteger last = new BigInteger( "-1" );
    static boolean visited = false;
    static Fraction acc = new Fraction( 1 );

    public static void init(){
        h = new ArrayList<BigInteger>();
        t = new ArrayList<BigInteger>();
        a = new ArrayList<BigInteger>();
        id = new ArrayList<BigInteger>();
        cnt = new TreeMap<BigInteger, Integer>();
    }

    public static Fraction solve(){
        Fraction ans = new Fraction( 0 );
        Fraction acc = new Fraction( 1 );
        int sz = h.size();
        boolean flag = true;
        for(int i = sz-1; i >= 0; --i){
            Fraction ht = new Fraction( h.get(i), t.get(i) );
            if(flag){
                acc.multiply( ht );
                //acc.reduce();
            }
            ans.add( new Fraction( a.get(i) ) );
            ans.multiply( ht );
            ans.add(new Fraction( a.get(i).multiply( t.get(i).subtract( h.get(i) ) ), t.get(i) ));
            if(id.get(i).equals(last)){
                Fraction mul = new Fraction(1);
                mul.subtract( acc );
                mul.inv();
                ans.multiply( mul );
                flag = false;
            }
            //ans.reduce();
        }
        return ans;
    }

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );
        BigInteger n = new BigInteger( br.readLine() );
        BigInteger two = new BigInteger( "2" );
        BigInteger cur = BigInteger.ONE;
        init();
        while( !cur.equals( BigInteger.ZERO ) ){
            id.add( cur );
            int count = cnt.containsKey( cur ) ? cnt.get( cur ) : 0;
            cnt.put( cur, count + 1 );
            if( count + 1 == 2 ){
                last = cur;
                break;
            }
            int k = 0;
            while( cur.compareTo( n ) < 0 ){
                cur = cur.multiply( two );
                ++k;
            }
            t.add( cur );
            cur = cur.subtract( n );
            h.add( cur );
            a.add( new BigInteger( String.valueOf(k) ) );
        }
        Fraction ans = solve();
        ans.reduce();
        System.out.println( ans );/**/
    }

    static class Fraction{
        private BigInteger num, den;

        public Fraction( int num, int den ){
            this.num = new BigInteger( String.valueOf(num) );
            this.den = new BigInteger( String.valueOf(den) );
        }
        public Fraction( int num ){
            this( num, 1 );
        }
        public Fraction( BigInteger num, BigInteger den ){
            this.num = num;
            this.den = den;
        }
        public Fraction( BigInteger num ){
            this( num, BigInteger.ONE );
        }

        public void add( Fraction o ){
            num = num.multiply( o.den ).add( o.num.multiply( den ) );
            den = den.multiply( o.den );
        }
        public void subtract( Fraction o ){
            num = num.multiply( o.den ).subtract( o.num.multiply( den ) );
            den = den.multiply( o.den );
        }
        public void multiply( Fraction o ){
            num = num.multiply( o.num );
            den = den.multiply( o.den );
        }
        public void inv(){
            BigInteger aux = num;
            num = den;
            den = aux;
        }
        public BigInteger get_gcd( BigInteger a, BigInteger b ){
            BigInteger xx = BigInteger.ZERO;
            BigInteger y = BigInteger.ZERO;
            BigInteger x = BigInteger.ONE;
            BigInteger yy = BigInteger.ONE;
            BigInteger q, t;
            while(!b.equals( BigInteger.ZERO )) {
                q = a.divide( b );
                t = b;
                b = a.mod( b );
                a = t;
                t = xx;
                xx = x.subtract( q.multiply( xx ) );
                x = t;
                t = yy;
                yy = y.subtract( q.multiply( yy ) );
                y = t;
            }
            return a;
        }
        public void reduce(){
            BigInteger g = num.gcd(den);
            num = num.divide( g );
            den = den.divide( g );
        }
        public String toString(){
            return num.toString() + "/" + den.toString();
        }
    }
}

//package round78;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Scanner;

public class B2 {
	Scanner in;
	PrintWriter out;
	String INPUT = "3";

	void solve()
	{
		long n = nl();
		int plus = 0;
		while(n%2==0){
			n>>>=1;
			plus++;
		}
		if(n == 1){
			out.println(plus + "/1");
			return;
		}

		// 1/n
		long cur = 1;
		int cycle = 1;
		BitSet bs = new BitSet();
		while(true){
			cur = cur * 2;
			if(cur >= n){
				cur -= n;
				bs.set(cycle);
				if(cur == 1)break;
			}
			cycle++;
		}
		// S=b/2^b+(b+c)/2^(b+c)+...
		// (1/2^c)S=b/2^(b+c)+..
		// (1-1/2^c)S=b/2^b+c/2^(b+c)+..
		// S=(b/2^b+c/2^(b+c)/(1-1/2^c))/(1-1/2^c)
		// =(b(2^c-1)+c)*2^c/(2^b*(2^c-1)^2)*n
		BigInteger num = BigInteger.ZERO;
		BigInteger c2 = BigInteger.ONE.shiftLeft(cycle);
		BigInteger c21 = c2.subtract(BigInteger.ONE);
		BigInteger den = c21.multiply(c21);
		for(int b = bs.nextSetBit(0);b != -1;b = bs.nextSetBit(b + 1)){
			num = num.add(bi(b).multiply(c21).add(bi(cycle)).shiftLeft(cycle-b));
		}
		num = num.multiply(bi(n));
		BigInteger g = num.gcd(den);
		num = num.divide(g);
		den = den.divide(g);
		num = num.add(den.multiply(bi(plus)));
		out.println(num + "/" + den);
	}

	BigInteger bi(long n)
	{
		return BigInteger.valueOf(n);
	}

	public static long gcd(long a, long b) {
		while (b > 0){
			long c = a;
			a = b;
			b = c % b;
		}
		return a;
	}

	void run() throws Exception
	{
		in = oj ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new B2().run();
	}

	int ni() { return Integer.parseInt(in.next()); }
	long nl() { return Long.parseLong(in.next()); }
	double nd() { return Double.parseDouble(in.next()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;

import org.omg.CORBA.FREE_MEM;

public class Main {
    class Pair{
        Long l1;
        Long l2;
    };
    HashMap<Pair, Fraction> F = new HashMap<Pair, Fraction>();

    class Fraction{
        public BigInteger p, q;

        public Fraction() {
            p = BigInteger.ZERO;
            q = BigInteger.ONE;
        }

        void multiply(long v){
            BigInteger tmp = BigInteger.valueOf(v);
            BigInteger gc = q.gcd(tmp);
            q = q.divide(gc);
            tmp = tmp.divide(gc);
            p = p.multiply(tmp);
        }
        void divide(long v){
            BigInteger tmp = BigInteger.valueOf(v);
            BigInteger gc = p.gcd(tmp);
            p = p.divide(gc);
            tmp = tmp.divide(gc);
            q = q.multiply(tmp);
        }
        Fraction divide(Fraction v){
            Fraction ret = new Fraction();
            ret.p = p.multiply(v.q);
            ret.q = q.multiply(v.p);
            ret.fix();
            return ret;
        }
        boolean less(Fraction f2){
            return p.multiply(f2.q).compareTo(f2.p.multiply(q)) < 0;
        }
        Fraction add(Fraction f2){
            Fraction ret = new Fraction();
            BigInteger lcm = q.divide(q.gcd(f2.q)).multiply(f2.q);
            ret.p = p.multiply(lcm.divide(q)).add(f2.p.multiply(lcm.divide(f2.q)));
            ret.q = lcm;
            return ret;
        }
        Fraction sub(Fraction f2){
            Fraction ret = new Fraction();
            ret.p = p.multiply(f2.q).subtract(f2.p.multiply(q));
            ret.q = q.multiply(f2.q);
            ret.fix();
            return ret;
        }

        void fix(){
            BigInteger gc = p.gcd(q);
            if (gc.compareTo(BigInteger.ZERO) != 0){
                p = p.divide(gc);
                q = q.divide(gc);
            } else {
                p = BigInteger.ZERO;
                q = BigInteger.ONE;
            }
        }

        public String toString(){
            return p.toString() + "/" + q.toString();
        }
    }
    void solve(){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        if (n == 1){
            out.println("0/1");
            out.flush();
            return;
        }

        boolean[] was = new boolean[n+1];
        Fraction ret = new Fraction();
        Fraction p = new Fraction();
        p.p = BigInteger.ONE;
        int fre = 1;
        was[1] = true;
        while (true){
            fre *= 2;
            ret = ret.add(p);
            if (fre >= n){
                p.multiply(fre - n);
                p.divide(fre);
                fre -= n;
            }
            if (!was[fre]){
                was[fre] = true;
            } else {
                if (fre != 0){
                    int cur = 1;
                    Fraction tmp = new Fraction(), pp = new Fraction();
                    pp.p = BigInteger.ONE;
                    while (cur != fre){
                        cur *= 2;
                        tmp = tmp.add(pp);
                        if (cur >= n){
                            pp.multiply(cur - n);
                            pp.divide(cur);
                            cur -= n;
                        }
                    }
                    Fraction f = ret.sub(tmp);
                    f = f.divide(pp.sub(p));
                    ret = f.add(tmp);
                }
                break;
            }
        }
        ret.fix();
        out.println(ret);
        out.flush();
    }
    public static void main(String[] args) {
        Main solver = new Main();
        solver.solve();
    }

}

import java.util.Scanner;

public class B implements Runnable {
	public static final double eps = 1e-8;
	public static void main(String[] args) {
		new Thread(null, new B(), "Solver", 1L << 26).start();
	}
	public void run() {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 1) {
			System.out.println("0/1");
			return;
		}
		/*long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;*/
		//System.out.println(num + "/" + den);
		double ans = solve((int)n,0);
		for(long den=1;den<=10_000_000;den++) {
			double num = ans*den;
			if(Math.abs(Math.round(num)-num) <= eps) {
				long tden = den;
				long tnum = Math.round(num);
				long gcd = gcd(tden,tnum);
				tnum /= gcd;
				tden /= gcd;

				System.out.println(tnum + "/" + tden);
				return;
			}
		}
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int genned) {
		int iter = 0;
		double ans = 0;
		double frac = 1;
		while(iter < 50_000_000) {
			iter++;
			if(genned == 0) {
				ans+= 1*frac;
				genned = 2;
				continue;
			}
			if(genned < n) {
				ans+= 1*frac;
				genned *=2;
				continue;
			}
			frac *= (genned-n) / (double)(genned);
			genned = genned-n;
		}
		return ans;
	}
}

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    static int n;
    static Fraction[] memo = new Fraction[100100];
    static boolean[] vis = new boolean[100100];

    static Fraction DP(int root, long depth) {
        int n2 = 0;
        while (n % 2 == 0) {
            n >>= 1;
            ++n2;
        }
        Fraction A = new Fraction(0, 1);
        Fraction B = new Fraction(1, 1);
        int lastRem = 1;
        while (root != 0) {
            int k;
            for (k = 1; (1 << k) < n; k++);
            int rem = (1 << k) - n;
            A = A.add(B.multiply(k));
            B = B.multiply(rem);
            B.b = B.b.shiftLeft(k).multiply(BigInteger.valueOf(lastRem));
            if (rem == 1) {
                B.a = B.b.subtract(B.a);
                A = A.devide(B);
                break;
            }
            lastRem = rem;
        }
        A.a = A.a.add(A.b.multiply(BigInteger.valueOf(n2)));
        return A;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        if (n == 0) {
            System.out.println("0/1");
            return;
        }
        Fraction ans = DP(1, 0);
        ans.reduce();
        System.out.println(ans.a + "/" + ans.b);
    }
}

class Fraction {

    BigInteger a = new BigInteger("0");
    BigInteger b = new BigInteger("1");

    Fraction() {

    }

    Fraction(long a, long b) {
        this.a = new BigInteger("" + a);
        this.b = new BigInteger("" + b);
    }

    Fraction(BigInteger a, BigInteger b) {
        this.a = a;
        this.b = b;
    }

    Fraction add(BigInteger x) {
        Fraction ans = new Fraction(a, b);
        ans.a = ans.a.add(x.multiply(b));
        ans.reduce();
        return ans;
    }

    Fraction multiply(BigInteger x) {
        Fraction ans = new Fraction(this.a, this.b);
        ans.a = ans.a.multiply(x);
        ans.reduce();
        return ans;
    }

    Fraction add(long x) {
        BigInteger bx = new BigInteger("" + x);
        Fraction ans = add(bx);
        ans.reduce();
        return ans;
    }

    Fraction multiply(long x) {
        BigInteger bx = new BigInteger("" + x);
        Fraction ans = multiply(bx);
        ans.reduce();
        return ans;
    }

    Fraction add(Fraction x) {
        BigInteger lo = b.multiply(x.b);
        BigInteger h1 = a.multiply(x.b);
        BigInteger h2 = x.a.multiply(b);
        BigInteger hi = h1.add(h2);
        Fraction ans = new Fraction(hi, lo);
        ans.reduce();
        return ans;
    }

    Fraction multiply(Fraction x) {
        BigInteger lo = b.multiply(x.b);
        BigInteger hi = a.multiply(x.a);
        Fraction ans = new Fraction(hi, lo);
        ans.reduce();
        return ans;
    }

    Fraction devide(Fraction x) {
        Fraction y = new Fraction(x.b, x.a);
        Fraction ans = multiply(y);
        ans.reduce();
        return ans;
    }

    BigInteger GCD(BigInteger a, BigInteger b) {
        for (;;) {
            if (a.equals(BigInteger.ZERO)) {
                return b;
            }
            b = b.mod(a);
            if (b.equals(BigInteger.ZERO)) {
                return a;
            }
            a = a.mod(b);
        }
    }

    void reduce() {
        BigInteger G = GCD(a, b);
        a = a.divide(G);
        b = b.divide(G);
    }
}

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    static int n;
    static Fraction[] memo = new Fraction[100100];
    static boolean[] vis = new boolean[100100];

    static Fraction DP(int root, long depth) {
        int n2 = 0;
        while (n % 2 == 0) {
            n >>= 1;
            ++n2;
        }
        Fraction A = new Fraction(0, 1);
        Fraction B = new Fraction(1, 1);
        int lastRem = 1;
        while (root != 0) {
            int k;
            for (k = 1; (lastRem << k) < n; k++);
            int rem = (lastRem << k) - n;
            A = A.add(B.multiply(k));
            B = B.multiply(rem);
            B.b = B.b.shiftLeft(k).multiply(BigInteger.valueOf(lastRem));
            if (rem == 1) {
                B.a = B.b.subtract(B.a);
                A = A.devide(B);
                break;
            }
            lastRem = rem;
        }
        A.a = A.a.add(A.b.multiply(BigInteger.valueOf(n2)));
        return A;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        if (n == 0) {
            System.out.println("0/1");
            return;
        }
        Fraction ans = DP(1, 0);
        ans.reduce();
        System.out.println(ans.a + "/" + ans.b);
    }
}

class Fraction {

    BigInteger a = new BigInteger("0");
    BigInteger b = new BigInteger("1");

    Fraction() {

    }

    Fraction(long a, long b) {
        this.a = new BigInteger("" + a);
        this.b = new BigInteger("" + b);
    }

    Fraction(BigInteger a, BigInteger b) {
        this.a = a;
        this.b = b;
    }

    Fraction add(BigInteger x) {
        Fraction ans = new Fraction(a, b);
        ans.a = ans.a.add(x.multiply(b));
        ans.reduce();
        return ans;
    }

    Fraction multiply(BigInteger x) {
        Fraction ans = new Fraction(this.a, this.b);
        ans.a = ans.a.multiply(x);
        ans.reduce();
        return ans;
    }

    Fraction add(long x) {
        BigInteger bx = new BigInteger("" + x);
        Fraction ans = add(bx);
        ans.reduce();
        return ans;
    }

    Fraction multiply(long x) {
        BigInteger bx = new BigInteger("" + x);
        Fraction ans = multiply(bx);
        ans.reduce();
        return ans;
    }

    Fraction add(Fraction x) {
        BigInteger lo = b.multiply(x.b);
        BigInteger h1 = a.multiply(x.b);
        BigInteger h2 = x.a.multiply(b);
        BigInteger hi = h1.add(h2);
        Fraction ans = new Fraction(hi, lo);
        ans.reduce();
        return ans;
    }

    Fraction multiply(Fraction x) {
        BigInteger lo = b.multiply(x.b);
        BigInteger hi = a.multiply(x.a);
        Fraction ans = new Fraction(hi, lo);
        ans.reduce();
        return ans;
    }

    Fraction devide(Fraction x) {
        Fraction y = new Fraction(x.b, x.a);
        Fraction ans = multiply(y);
        ans.reduce();
        return ans;
    }

    BigInteger GCD(BigInteger a, BigInteger b) {
        for (;;) {
            if (a.equals(BigInteger.ZERO)) {
                return b;
            }
            b = b.mod(a);
            if (b.equals(BigInteger.ZERO)) {
                return a;
            }
            a = a.mod(b);
        }
    }

    void reduce() {
        BigInteger G = GCD(a, b);
        a = a.divide(G);
        b = b.divide(G);
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int len = 0;
            int cur = n - 1;
            while (cur > 0) {
                cur /= 2;
                len++;
            }
            cur = n;
            int ones = 0;
            while (cur > 0) {
                if (cur % 2 == 1) ones++;
                cur /= 2;
            }
            if (ones <= 1) {
                out.println(len + "/1");
            } else {
                BigInteger allPos = BigInteger.valueOf(2).pow(len);
                BigInteger num = BigInteger.valueOf(len).multiply(BigInteger.valueOf(n)).multiply(allPos);
                BigInteger den = allPos.subtract(BigInteger.valueOf(1)).pow(2);
                BigInteger gcd = den.gcd(num);
                den = den.divide(gcd);
                num = num.divide(gcd);
                out.println(num + "/" + den);
            }
        }

    }

    static class InputReader {
        private StringTokenizer tokenizer;
        private BufferedReader reader;

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.math.BigInteger;
import java.util.Scanner;
import java.io.PrintWriter;

public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		int n2 = 0;
		while (n % 2 == 0) {
			n >>= 1;
			++n2;
		}
		if (n == 1) {
			out.println(n2+"/1");
			return;
		}
		Fraction A = new Fraction(BigInteger.ZERO, BigInteger.ONE);
		Fraction B = new Fraction(BigInteger.ONE, BigInteger.ONE);
		for (int i=1,k=0; ; ) {
			for (k=0; (i<<k)<n; ++k);
			int rem = (i << k) - n;
			Fraction A1 = new Fraction(BigInteger.valueOf(k), BigInteger.ONE);
			Fraction B1 = new Fraction(BigInteger.valueOf(rem), BigInteger.valueOf(i<<k));
			A = A.add(B.multiply(A1));
			B = B.multiply(B1);
			if (rem == 1) {
				B.a = B.b.subtract(B.a);
				A = A.divide(B);
				break;
			}
			i = rem;
		}
		A.a = A.a.add(A.b.multiply(BigInteger.valueOf(n2)));
		out.println(A.a+"/"+A.b);
	}
}

class Fraction {
	public BigInteger a, b;
	public Fraction(BigInteger a, BigInteger b) {
		this.a = a;
		this.b = b;
		reduce();
	}
	public Fraction add(Fraction rhs) {
		BigInteger x = this.a.multiply(rhs.b).add(this.b.multiply(rhs.a));
		BigInteger y = this.b.multiply(rhs.b);
		return new Fraction(x, y);
	}
	public Fraction multiply(Fraction rhs) {
		BigInteger x = this.a.multiply(rhs.a);
		BigInteger y = this.b.multiply(rhs.b);
		return new Fraction(x, y);
	}
	public Fraction divide(Fraction rhs) {
		Fraction r = new Fraction(rhs.b, rhs.a);
		return this.multiply(r);
	}
	public void reduce() {
		BigInteger d = this.a.gcd(b);
		this.a = this.a.divide(d);
		this.b = this.b.divide(d);
	}
}

import java.math.BigInteger;
import java.util.Scanner;
import java.io.PrintWriter;

public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		int n2 = 0;
		while (n % 2 == 0) {
			n >>= 1;
			++n2;
		}
		if (n == 1) {
			out.print(n2+"/1");
			out.close();
			return;
		}
		Fraction A = new Fraction(BigInteger.ZERO, BigInteger.ONE);
		Fraction B = new Fraction(BigInteger.ONE, BigInteger.ONE);
		for (int i=1,k=0,cnt=0; ; ++cnt) {
			for (k=0; (i<<k)<n; ++k);
			int rem = (i << k) - n;
			A = A.add(B.multiply(k));
			B = B.multiply(rem);
			B.b = B.b.shiftLeft(k).multiply(BigInteger.valueOf(i));
			if (rem == 1) {
				B.a = B.b.subtract(B.a);
				A = A.divide(B);
				break;
			}
			i = rem;
		}
		A.a = A.a.add(A.b.multiply(BigInteger.valueOf(n2)));
		out.print(A.a+"/"+A.b);
		out.close();
	}
}

class Fraction {
	public BigInteger a, b;
	public Fraction(BigInteger a, BigInteger b) {
		this.a = a;
		this.b = b;
		reduce();
	}
	public Fraction add(Fraction rhs) {
		BigInteger d = this.b.gcd(rhs.b);
		BigInteger y = rhs.b.divide(d).multiply(rhs.b);
		BigInteger x = y.divide(rhs.b).multiply(a).add(y.divide(b).multiply(rhs.a));
		return new Fraction(x, y);
	}
	public Fraction multiply(Fraction rhs) {
		BigInteger x = this.a.multiply(rhs.a);
		BigInteger y = this.b.multiply(rhs.b);
		return new Fraction(x, y);
	}
	public Fraction multiply(long rhs) {
		BigInteger r = BigInteger.valueOf(rhs);
		BigInteger d = r.gcd(this.b);
		r = r.divide(d);
		return new Fraction(this.a.multiply(r), this.b.divide(d));
	}
	public Fraction divide(Fraction rhs) {
		Fraction r = new Fraction(rhs.b, rhs.a);
		return this.multiply(r);
	}
	public void reduce() {
		BigInteger d = this.a.gcd(b);
		this.a = this.a.divide(d);
		this.b = this.b.divide(d);
	}
}

import java.math.BigInteger;
import java.util.*;

public class Main {
	public static int []to = new int[10];
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt(), start = -1;
		if (n == 1) {
			System.out.println("1/1");
			return;
		}
		for (int i=0,rem=1,nxt_rem=-1; ; rem=nxt_rem,++i) {
			nxt_rem = rem * 2;
			if (nxt_rem >= n) nxt_rem -= n;
			if (to[nxt_rem] != 0) {
				start = nxt_rem;
				break;
			}
			to[rem] = nxt_rem;
			if (rem == 0) {
				System.out.println(i+"/1");
				return;
			}
		}
		Fraction A = new Fraction(BigInteger.ONE, BigInteger.ONE);
		int next_start = 2 * start;
		if (next_start >= n) next_start -= n;
		Fraction B = new Fraction(BigInteger.valueOf(next_start), BigInteger.valueOf(2*start));
		for (int i=next_start; ; ) {
			int b = i * 2;
			int a = b;
			if (a >= n) a -= n;
			Fraction C = new Fraction(BigInteger.valueOf(a), BigInteger.valueOf(b));
			A = A.add(B);
			B = B.multiply(C);
			i = a;
			if (a == start) {
				B.a = B.b.subtract(B.a);
				A = A.divide(B);
				break;
			}
		}
		for (int i=1; i!=start; ) {
			A.a = A.a.add(A.b);
			int j = i * 2;
			if (j >= n) j -= n;
			i = j;
		}
		System.out.println(A.a+"/"+A.b);
	}
}

class Fraction {
	public BigInteger a, b;
	public Fraction(BigInteger a, BigInteger b) {
		BigInteger d = a.gcd(b);
		this.a = a.divide(d);
		this.b = b.divide(d);
	}
	public Fraction add(Fraction rhs) {
		BigInteger x = this.a.multiply(rhs.b).add(this.b.multiply(rhs.a));
		BigInteger y = this.b.multiply(rhs.b);
		BigInteger d = x.gcd(y);
		x = x.divide(d);
		y = y.divide(d);
		return new Fraction(x, y);
	}
	public Fraction multiply(Fraction rhs) {
		BigInteger x = this.a.multiply(rhs.a);
		BigInteger y = this.b.multiply(rhs.b);
		BigInteger d = x.gcd(y);
		x = x.divide(d);
		y = y.divide(d);
		return new Fraction(x, y);
	}
	public Fraction divide(Fraction rhs) {
		Fraction r = new Fraction(rhs.b, rhs.a);
		return this.multiply(r);
	}
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.math.BigInteger;
import java.util.Scanner;
/**
 *
 * @author Макар
 */

public class Main {
    class Fraction
{
    private BigInteger ch,zn;
    Fraction()
    {
        ch = BigInteger.ZERO;
        zn = BigInteger.ONE;
    }
    Fraction(BigInteger x)
    {
        ch = x;
        zn = BigInteger.ONE;
    }
    Fraction(BigInteger x,BigInteger y)
    {
        BigInteger g = x.gcd(y);
        ch = x.divide(g);
        zn = y.divide(g);
    }
    public Fraction relax()
    {
        BigInteger g = ch.gcd(zn);
        return new Fraction(ch.divide(g), zn.divide(g));
    }
    public Fraction add(Fraction x)
    {
        BigInteger g = zn.gcd(x.zn);
        BigInteger nok = zn.multiply(x.zn).divide(g);
        Fraction res = new Fraction();
        res.ch = res.ch.add(ch.multiply(x.zn.divide(g)));
        res.ch = res.ch.add(x.ch.multiply(zn.divide(g)));
        res.zn = nok;
        return res.relax();
    }
    public Fraction sub(Fraction x)
    {
        BigInteger g = zn.gcd(x.zn);
        BigInteger nok = zn.multiply(x.zn).divide(g);
        Fraction res = new Fraction();
        res.ch = res.ch.add(ch.multiply(x.zn.divide(g)));
        res.ch = res.ch.subtract(x.ch.multiply(zn.divide(g)));
        res.zn = nok;
        return res.relax();
    }
    public Fraction multiply(Fraction x)
    {
        Fraction res = x;
        res.ch = res.ch.multiply(ch);
        res.zn = res.zn.multiply(zn);
        return res.relax();
    }
    public Fraction divide(Fraction x)
    {
        return (this).multiply(x.inverse());
    }
    public Fraction inverse()
    {
        return new Fraction(zn,ch);
    }
    public Fraction ONE()
    {
        return new Fraction(BigInteger.ONE,BigInteger.ONE);
    }
    public void write()
    {
        System.out.print(ch.toString());
        System.out.print("/");
        System.out.print(zn.toString());
        System.out.flush();
    }
}
    Scanner sc;
    Main()
    {
        sc = new Scanner(System.in);
        Solve();
    }
    int n;
    Fraction mul[];
    int used[];
    Fraction DP(int x, Fraction toMul)
    {
        if (used[x] != 0)
        {
            used[x]=2;
            mul[x] = toMul;
            return new Fraction();
        }
        mul[x] = toMul;
        used[x]=1;
        int k = 0;
        int t = x;
        while (t < n)
        {
            t*=2;
            k++;
        }
        Fraction res = new Fraction(BigInteger.valueOf(k));
        if (t - n > 0)
        {
            Fraction m1 = new Fraction(BigInteger.valueOf(t - n), BigInteger.valueOf(t));
            res = res.add(
                    DP(t - n,toMul.multiply(m1)).multiply(m1));
            Fraction hint = mul[x].divide(toMul);
            if (used[x] == 2)
                res = res.divide(new Fraction(BigInteger.ONE,BigInteger.ONE).sub(hint));
        }
        return res;
    }
    private void Solve()
    {
        n = sc.nextInt();
        mul = new Fraction[16384];
        used = new int[16384];
        Fraction res = DP(1,new Fraction(BigInteger.ONE,BigInteger.ONE));
        res.write();
    }
    public static void main(String[] args) {
        new Main();
    }

}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.math.BigInteger;
import java.util.Scanner;
/**
 *
 * @author Макар
 */

public class Main {
    class Fraction
{
    private BigInteger ch,zn;
    Fraction()
    {
        ch = BigInteger.ZERO;
        zn = BigInteger.ONE;
    }
    Fraction(BigInteger x)
    {
        ch = x;
        zn = BigInteger.ONE;
    }
    Fraction(BigInteger x,BigInteger y)
    {
        BigInteger g = x.gcd(y);
        ch = x.divide(g);
        zn = y.divide(g);
    }
    public Fraction relax()
    {
        BigInteger g = ch.gcd(zn);
        return new Fraction(ch.divide(g), zn.divide(g));
    }
    public Fraction add(Fraction x)
    {
        BigInteger g = zn.gcd(x.zn);
        BigInteger nok = zn.multiply(x.zn).divide(g);
        Fraction res = new Fraction();
        res.ch = res.ch.add(ch.multiply(x.zn.divide(g)));
        res.ch = res.ch.add(x.ch.multiply(zn.divide(g)));
        res.zn = nok;
        return res.relax();
    }
    public Fraction sub(Fraction x)
    {
        BigInteger g = zn.gcd(x.zn);
        BigInteger nok = zn.multiply(x.zn).divide(g);
        Fraction res = new Fraction();
        res.ch = res.ch.add(ch.multiply(x.zn.divide(g)));
        res.ch = res.ch.subtract(x.ch.multiply(zn.divide(g)));
        res.zn = nok;
        return res.relax();
    }
    public Fraction multiply(Fraction x)
    {
        Fraction res = x;
        res.ch = res.ch.multiply(ch);
        res.zn = res.zn.multiply(zn);
        return res.relax();
    }
    public Fraction inverse()
    {
        return new Fraction(zn,ch);
    }
    public Fraction ONE()
    {
        return new Fraction(BigInteger.ONE,BigInteger.ONE);
    }
    public void write()
    {
        System.out.print(ch.toString());
        System.out.print("/");
        System.out.print(zn.toString());
        System.out.flush();
    }
}
    Scanner sc;
    Main()
    {
        sc = new Scanner(System.in);
        Solve();
    }
    int n;
    Fraction mul[];
    boolean used[];
    Fraction DP(int x, Fraction toMul)
    {
        if (used[x])
        {
            mul[x] = toMul;
            return new Fraction();
        }
        mul[x] = new Fraction();
        used[x]=true;
        int k = 0;
        int t = x;
        while (t < n)
        {
            t*=2;
            k++;
        }
        Fraction res = new Fraction(BigInteger.valueOf(k));
        if (t - n > 0) {
            res = res.add(
                    DP(t - n,
                    new Fraction(BigInteger.valueOf(t - n), BigInteger.valueOf(t)).multiply(toMul)).multiply(
                    new Fraction(BigInteger.valueOf(t - n), BigInteger.valueOf(t))
                    ));
        res = res.multiply( new Fraction(BigInteger.ONE,BigInteger.ONE).sub(mul[x]).inverse());
        }
        return res;
    }
    private void Solve()
    {
        n = sc.nextInt();
        mul = new Fraction[16384];
        used = new boolean[16384];
        Fraction res = DP(1,new Fraction(BigInteger.ONE,BigInteger.ONE));
        res.write();
    }
    public static void main(String[] args) {
        new Main();
    }

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Solution
{
	public static void main (String[] argv)
	{
		Scanner in = new Scanner (System.in);

		int n = in.nextInt();

		int h = 0;
		while ((1 << h) < n)
			h++;

		BigInteger numer = BigInteger.ONE.shiftLeft(h).multiply(BigInteger.valueOf(h));
		BigInteger denom = BigInteger.valueOf(n);
		BigInteger g = numer.gcd(denom);

		numer = numer.divide(g);
		denom = denom.divide(g);

		System.out.println(numer + "/" + denom);
	}
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.math.*;

public class Solution
{
    public static class Frac
    {
        BigInteger numer, denom;
        Frac () { numer = BigInteger.ZERO; denom = BigInteger.ONE; }
        Frac (BigInteger num, BigInteger den) { numer = num; denom = den; }
    }

    static int n, sza;
    static int idx[], a[];
    static Frac k[], b[], d[];
    static long stTime;

    public static Frac multFrac (Frac a, Frac b)
    {
        BigInteger g1 = a.numer.gcd(b.denom), g2 = a.denom.gcd(b.numer);
        return new Frac(a.numer.divide(g1).multiply(b.numer.divide(g2)), a.denom.divide(g2).multiply(b.denom.divide(g1)));
    }

    public static Frac norm (Frac a)
    {
        BigInteger g = a.numer.gcd(a.denom);
        return new Frac(a.numer.divide(g), a.denom.divide(g));
    }

    public static Frac addFrac (Frac a, Frac b)
    {
        BigInteger lcm = a.denom.divide(a.denom.gcd(b.denom)).multiply(b.denom);
        BigInteger num = a.numer.multiply(lcm.divide(a.denom)).add(b.numer.multiply(lcm.divide(b.denom)));

        return new Frac(num, lcm);

        /*
        BigInteger num = a.numer.multiply(b.denom).add(b.numer.multiply(a.denom));
        BigInteger den1 = a.denom, den2 = b.denom;
        BigInteger g1 = num.gcd(den1);
        num = num.divide(g1);
        den1 = den1.divide(g1);
        BigInteger g2 = num.gcd(den2);
        num = num.divide(g2);
        den2 = den2.divide(g2);

        return new Frac(num, den1.multiply(den2));
        */
    }

    static Frac solve ()
    {
        int cnt = 1;
        int fcalc = -1;

        while (true)
        {
            a[sza] = cnt;
            idx[cnt] = sza;

            int h = 0;
            while ((cnt << h) < n)
                h++;

            int rem = (cnt << h) - n;

            if (rem == 0)
            {
                d[sza] = new Frac(BigInteger.valueOf(h), BigInteger.ONE);
                fcalc = sza;
                break;
            }

            b[sza] = new Frac(BigInteger.valueOf(h), BigInteger.ONE);
            k[sza] = new Frac(BigInteger.valueOf(rem), BigInteger.valueOf(cnt << h));

            if (idx[rem] != -1)
            {
                Frac curb = b[sza], curk = k[sza];

                for (int i = sza - 1; i >= idx[rem]; i--)
                {
                    Frac nb = addFrac(b[i], multFrac(curb, k[i]));
                    Frac nk = multFrac(curk, k[i]);
                    curb = nb; curk = nk;
                }

                d[idx[rem]] = multFrac(new Frac(curk.denom, curk.denom.subtract(curk.numer)), curb);

                fcalc = idx[rem];
                break;
            }
            sza++;
            cnt = rem;
        }

        Frac cur = d[fcalc];
        for (int i = fcalc - 1; i >= 0; i--)
            cur = addFrac(b[i], multFrac(k[i], cur));

        cur = norm(cur);

        return cur;
    }

    public static void main (String[] argv)
    {
        Scanner in = new Scanner (System.in);
        n = in.nextInt();
        stTime = System.currentTimeMillis();
        idx = new int [n + 5];
        for (int i = 0; i <= n; i++)
            idx[i] = -1;
        a = new int [n + 5];
        sza = 0;
        k = new Frac [n + 5];
        b = new Frac [n + 5];
        d = new Frac [n + 5];

        Frac ans = solve();
        System.out.println(System.currentTimeMillis() - stTime);

        System.out.println(ans.numer + "/" + ans.denom);
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
    public static void main(String args[]) throws Exception
    {
        Scanner cin=new Scanner(System.in);
        int[] use=new int[10010];
        while (cin.hasNext())
        {
            int n=cin.nextInt();
            if (n==1)
            {
                System.out.println("0/1");
                continue;
            }

            for (int i=0;i<=n;i++)
                use[i]=0;
            int depth=0,now=1;
            BigInteger fz=BigInteger.valueOf(1),fm=BigInteger.valueOf(1);
            while (now!=0&&use[now]==0)
            {
                use[now]=1;
                fm=fm.multiply(BigInteger.valueOf(now*2));
                fz=fz.multiply(BigInteger.valueOf((now*2)%n));
                now=(now*2)%n;
                depth++;
                BigInteger gg=fm.gcd(fz);
                if (gg.compareTo(BigInteger.valueOf(0))!=0)
                {
                    fm=fm.divide(gg);
                    fz=fz.divide(gg);
                }
            }
            int xh=depth;
            for (int i=0;i<=n;i++)
                use[i]=0;
            boolean cir=false;
            int pos=now;
            depth=0; now=1;
            BigInteger tfz,tfm,ansfz,ansfm;
            tfz=tfm=ansfm=BigInteger.valueOf(1);
            ansfz=BigInteger.valueOf(0);
            while (now!=0&&use[now]==0)
            {
                use[now]=1;
                if (now==pos) cir=true;
                tfm=tfm.multiply(BigInteger.valueOf(now*2));
                tfz=tfz.multiply(BigInteger.valueOf((now*2)%n));
                depth++;
                BigInteger aa,bb;
                bb=tfm;
                aa=(tfm.add(tfz.negate())).multiply(BigInteger.valueOf(depth));
                if (cir==false)
                {
                    BigInteger temp=ansfm;
                    ansfm=ansfm.multiply(bb);
                    ansfz=ansfz.multiply(bb);
                    ansfz=ansfz.add(aa.multiply(temp));
                }
                else
                {
                    BigInteger a=aa,b=bb;
                    a=a.multiply(fm);
                    b=b.multiply(fm.add(fz.negate()));
                    BigInteger temp=ansfm;
                    ansfm=ansfm.multiply(b);
                    ansfz=ansfz.multiply(b);
                    ansfz=ansfz.add(a.multiply(temp));
                    b=tfm;
                    a=(tfm.add(tfz.negate())).multiply(BigInteger.valueOf(xh));
                    a=a.multiply(fz);
                    b=b.multiply(fm);
                    a=a.multiply(fm).multiply(fm);
                    BigInteger num=fm.add(fz.negate());
                    b=b.multiply(num).multiply(num);
                    temp=ansfm;
                    ansfm=ansfm.multiply(b);
                    ansfz=ansfz.multiply(b);
                    ansfz=ansfz.add(a.multiply(temp));
                }
                now=(now*2)%n;
                BigInteger gg=ansfm.gcd(ansfz);
                if (gg.compareTo(BigInteger.valueOf(0))!=0)
                {
                    ansfm=ansfm.divide(gg);
                    ansfz=ansfz.divide(gg);
                }
            }
            System.out.print(ansfz);
            System.out.print("/");
            System.out.println(ansfm);
        }
    }

}

//package round78;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class B {
	Scanner in;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		long n = nl();
		int t = 64-Long.numberOfLeadingZeros(n-1);
		long a = t*(1L<<t);
		long b = n;
		long g = gcd(a,b);
		a /= g;
		b /= g;
		out.println(a + "/" + b);
	}

	public static long gcd(long a, long b) {
		while (b > 0){
			long c = a;
			a = b;
			b = c % b;
		}
		return a;
	}

	void run() throws Exception
	{
		in = oj ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new B().run();
	}

	int ni() { return Integer.parseInt(in.next()); }
	long nl() { return Long.parseLong(in.next()); }
	double nd() { return Double.parseDouble(in.next()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round78;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class B {
	Scanner in;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		long n = nl();
		int p = Long.numberOfTrailingZeros(n);
		n >>= p;
		int t = 64-Long.numberOfLeadingZeros(n-1);

		long a = t*(1L<<t);
		long b = n;
		long g = gcd(a,b);
		a /= g;
		b /= g;
		out.println((a+b*p) + "/" + b);
	}

	public static long gcd(long a, long b) {
		while (b > 0){
			long c = a;
			a = b;
			b = c % b;
		}
		return a;
	}

	void run() throws Exception
	{
		in = oj ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new B().run();
	}

	int ni() { return Integer.parseInt(in.next()); }
	long nl() { return Long.parseLong(in.next()); }
	double nd() { return Double.parseDouble(in.next()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round78;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class B {
	Scanner in;
	PrintWriter out;
	String INPUT = "5";

	void solve()
	{
		long n = nl();
		int p = Long.numberOfTrailingZeros(n);
		n >>= p;
		int t = 64-Long.numberOfLeadingZeros(n-1);

		long a = t*(1L<<t);
		long l = (1L<<t)-n;
		for(int i = t-1;i >= 0;i--){
			if((1L<<i) <= l){
				l -= 1L<<i;
				a -= i*(1L<<i);
			}
		}
		long b = n;
		long g = gcd(a,b);
		a /= g;
		b /= g;
		out.println((a+b*p) + "/" + b);
	}

	public static long gcd(long a, long b) {
		while (b > 0){
			long c = a;
			a = b;
			b = c % b;
		}
		return a;
	}

	void run() throws Exception
	{
		in = oj ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new B().run();
	}

	int ni() { return Integer.parseInt(in.next()); }
	long nl() { return Long.parseLong(in.next()); }
	double nd() { return Double.parseDouble(in.next()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

//package round78;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class B2 {
	Scanner in;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		long n = nl();
		int[] s = new int[2];
		for(int i = 0;i < 63;i++){
			if(n>>>i == 0)break;
			s[(int)((n>>>i)%2)]++;
		}
		if(s[1] == 1){
			out.println(s[0] + "/1");
			return;
		}
		long a = s[1]*(1L<<s[1]);
		long b = (1L<<s[1])-1;
		long g = gcd(a,b);
		a /= g;
		b /= g;
		out.println((a+b*s[0]) + "/" + b);
	}

	public static long gcd(long a, long b) {
		while (b > 0){
			long c = a;
			a = b;
			b = c % b;
		}
		return a;
	}

	void run() throws Exception
	{
		in = oj ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception
	{
		new B2().run();
	}

	int ni() { return Integer.parseInt(in.next()); }
	long nl() { return Long.parseLong(in.next()); }
	double nd() { return Double.parseDouble(in.next()); }
	boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;

public class Main {
    void solve(){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        long n = in.nextLong();
        if (n == 1){
            out.println("0/1");
            out.flush();
            return;
        }
        long dg = 1, q = 0, q2 = 0;
        while (n % 2 == 0){
            q2++;
            n /= 2;
        }
        while (dg < n){
            dg *= 2;
            q++;
        }
        BigInteger nn = BigInteger.valueOf(n);
        BigInteger ret = BigInteger.valueOf(dg).multiply(BigInteger.valueOf(q)).add(BigInteger.valueOf(q2).multiply(nn));
        BigInteger gc = ret.gcd(nn);
        nn = nn.divide(gc);
        ret = ret.divide(gc);
        out.println(ret + "/" + nn);
        out.flush();
    }
    public static void main(String[] args) {
        Main solver = new Main();
        solver.solve();
    }

}

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;

public class Main {
    class Pair{
        Long l1;
        Long l2;
    };
    HashMap<Pair, Fraction> F = new HashMap<Pair, Fraction>();

    class Fraction{
        public BigInteger p, q;
        public Fraction() {
            p = BigInteger.ZERO;
            q = BigInteger.ONE;
        }

        void multiply(long v){
            p = p.multiply(BigInteger.valueOf(v));
        }
        boolean less(Fraction f2){
            return p.multiply(f2.q).compareTo(f2.p.multiply(q)) < 0;
        }
        Fraction add(Fraction f2){
            Fraction ret = new Fraction();
            ret.p = p.multiply(f2.q).add(f2.p.multiply(q));
            ret.q = q.multiply(f2.q);
            return ret;
        }

        void fix(){
            BigInteger gc = p.gcd(q);
            p = p.divide(gc);
            q = q.divide(gc);
        }

    }

    Fraction DFS(long v, long last){
        if (v == 1){
            return new Fraction();
        }
        Pair pp = new Pair();
        pp.l1 = v;
        pp.l2 = last;
        if (F.containsKey(pp)){
            return F.get(pp);
        }
        Fraction ret = new Fraction();
        ret.p = BigInteger.valueOf(v);
        for (long i=last; i*i <= v; i++){
            if (v % i ==0){
                long d = 1, q2 = 0;
                while (d < i){
                    d *= 2;
                    q2++;
                }
                Fraction cur = DFS(v/i, i);
                Fraction tmp = new Fraction();
                tmp.p = BigInteger.valueOf(d).multiply(BigInteger.valueOf(q2));
                tmp.q = BigInteger.valueOf(i);
                cur = cur.add(tmp);
                if (cur.less(ret)){
                    ret = cur;
                }
            }
        }
        if (v != 1){
            long d = 1, q2 = 0;
            while (d < v){
                d *= 2;
                q2++;
            }
            Fraction cur = DFS(1, 0);
            Fraction tmp = new Fraction();
            tmp.p = BigInteger.valueOf(d).multiply(BigInteger.valueOf(q2));
            tmp.q = BigInteger.valueOf(v);
            cur = cur.add(tmp);
            if (cur.less(ret)){
                ret = cur;
            }
        }
        F.put(pp, ret);
        return ret;
    }
    void solve(){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        long n = in.nextLong();
        if (n == 1){
            out.println("0/1");
            out.flush();
            return;
        }
        Fraction ret = DFS(n, 2);
        ret.fix();
        out.println(ret.p + "/" + ret.q);
        out.flush();
    }
    public static void main(String[] args) {
        Main solver = new Main();
        solver.solve();
    }

}

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;

public class Main {
    class Pair{
        Long l1;
        Long l2;
    };
    HashMap<Pair, Fraction> F = new HashMap<Pair, Fraction>();

    class Fraction{
        public BigInteger p, q;
        public Fraction() {
            p = BigInteger.ZERO;
            q = BigInteger.ONE;
        }

        void multiply(long v){
            p = p.multiply(BigInteger.valueOf(v));
        }
        boolean less(Fraction f2){
            return p.multiply(f2.q).compareTo(f2.p.multiply(q)) < 0;
        }
        Fraction add(Fraction f2){
            Fraction ret = new Fraction();
            ret.p = p.multiply(f2.q).add(f2.p.multiply(q));
            ret.q = q.multiply(f2.q);
            return ret;
        }

        void fix(){
            BigInteger gc = p.gcd(q);
            p = p.divide(gc);
            q = q.divide(gc);
        }

    }

    Fraction DFS(long v, long last){
        if (v == 1){
            return new Fraction();
        }
        Pair pp = new Pair();
        pp.l1 = v;
        pp.l2 = last;
        if (F.containsKey(pp)){
            return F.get(pp);
        }
        Fraction ret = new Fraction();
        ret.p = BigInteger.valueOf(v);
        for (long i=last; i*i <= v; i++){
            if (v % i ==0){
                long d = 1, q2 = 0;
                while (d < i){
                    d *= 2;
                    q2++;
                }
                Fraction cur = DFS(v/i, i);
                Fraction tmp = new Fraction();
                tmp.p = BigInteger.valueOf(d).multiply(BigInteger.valueOf(q2));
                tmp.q = BigInteger.valueOf(i);
                cur = cur.add(tmp);
                if (ret.less(cur)){
                    ret = cur;
                }
            }
        }
        if (v != 1){
            long d = 1, q2 = 0;
            while (d < v){
                d *= 2;
                q2++;
            }
            Fraction cur = DFS(1, 0);
            Fraction tmp = new Fraction();
            tmp.p = BigInteger.valueOf(d).multiply(BigInteger.valueOf(q2));
            tmp.q = BigInteger.valueOf(v);
            cur = cur.add(tmp);
            if (cur.less(ret)){
                ret = cur;
            }
        }
        F.put(pp, ret);
        return ret;
    }
    void solve(){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        long n = in.nextLong();
        if (n == 1){
            out.println("0/1");
            out.flush();
            return;
        }
        Fraction ret = DFS(n, 2);
        ret.fix();
        out.println(ret.p + "/" + ret.q);
        out.flush();
    }
    public static void main(String[] args) {
        Main solver = new Main();
        solver.solve();
    }

}

import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;

public class Main {
    void solve(){
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        long n = in.nextLong();
        if (n == 1){
            out.println("0/1");
            out.flush();
            return;
        }
        long dg = 1, q = 0;
        while (dg < n){
            dg *= 2;
            q++;
        }
        BigInteger nn = BigInteger.valueOf(n);
        BigInteger ret = BigInteger.valueOf(dg).multiply(BigInteger.valueOf(q));
        BigInteger gc = ret.gcd(nn);
        nn = nn.divide(gc);
        ret = ret.divide(gc);
        out.println(ret + "/" + nn);
        out.flush();
    }
    public static void main(String[] args) {
        Main solver = new Main();
        solver.solve();
    }

}

import java.io.*;
import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt(), c=1, f;
        int[] u=new int[n+1]; u[0]=1;
        while (u[c]!=1)
        {
            u[c]=1; c<<=1; if (c>=n) c-=n;
        }
        Q a=new Q(0), b=new Q(0), m=new Q(1);
        if (n==1)
        {
        }
        else if (n==2)
        {
            a=new Q(1);
        }
        else if (c==0)
        {
            c=1;
            while (c!=0)
            {
                c*=2;
                if (2*c<n)
                {
                    a=a.add(m);
                }
                else
                {
                    a.add(m.multipy(new Q(n, c)));
                    m=m.multipy(new Q(c-n, c));
                    c-=n;
                }
            }
        }
        else
        {
            f=c;
            do
            {
                c*=2;
                if (c<n)
                {
                    a=a.add(m);
                }
                else
                {
                    a=a.add(m.multipy(new Q(n, c)));
                    m=m.multipy(new Q(c-n, c));
                    a=a.add(m);
                    c-=n;
                }
            }
            while (f!=c);
            b=a.divide((new Q(1).subtract(m)));
            c=1;
            a=new Q(0); m=new Q(1);
            while (c!=f)
            {
                c*=2;
                if (2*c<n)
                {
                    a=a.add(m);
                }
                else
                {
                    a.add(m.multipy(new Q(n, c)));
                    m=m.multipy(new Q(c-n, c));
                    c-=n;
                }
            }
            a=a.add(b.multipy(m));
        }
        System.out.println(a.toString());
    }
}

class Q {
    private BigInteger p, q, t;
    public void Q()
    {
        p=BigInteger.ZERO; q=BigInteger.ONE;
    }
    public Q(int a)
    {
        p=BigInteger.valueOf(a); q=BigInteger.valueOf(1);
    }
    public Q(int a, int b)
    {
        p=BigInteger.valueOf(a); q=BigInteger.valueOf(b);
        rc();
    }
    public Q(BigInteger a, BigInteger b)
    {
        p=a; q=b;
        rc();
    }
    private void rc()
    {
        t=p.gcd(q);
        p=p.divide(t);
        q=q.divide(t);
    }
    public Q add(Q a)
    {
        return new Q((a.p.multiply(q)).add((p.multiply(a.q))), a.q.multiply(q));
    }
    public Q multipy(Q a)
    {
        return new Q(a.p.multiply(p), a.q.multiply(q));
    }
    public Q negate()
    {
        return new Q(p.negate(), q);
    }
    public Q subtract(Q a)
    {
        return add(a.negate());
    }
    public Q divide(Q a)
    {
        return new Q(a.q.multiply(p), a.p.multiply(q));
    }
    @Override
    public String toString()
    {
        return p+"/"+q;
    }
}

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

    public class Main {

        PrintWriter writer;
        Scanner reader;
        long n;
        ArrayList<Long>num;
        ArrayList<Long>den;
        public Main(){

            reader = new Scanner(System.in);
            n=reader.nextLong();
            reader.close();
            num=new ArrayList<Long>();
            den=new ArrayList<Long>();
        }

        public void solve(long m){

            if(m%2==0){
                num.add((long)1);
                den.add((long)1);
                solve(m/2);
                return;
            }
            if(m!=1){
                long a=0;
                long expa=1;
                while(expa<m){
                    expa*=2;
                    a++;
                }
                num.add(expa*(a-1)+m+1);
                den.add(m);
            }
            long denx=1;
            for(long x:den)
                denx*=x;
            long numx=0;
            for(int i=0;i<num.size();i++){
                numx+=num.get(i)*denx;
                numx/=den.get(i);
            }
            long r=PGCD(numx,denx);
            System.out.println(numx/r+"/"+denx/r);

        }

        public static long PGCD(long a, long b){
            long r=a%b;
            return (r==0)?b:PGCD(b,r);
        }

        public static void main(String[] args) {
            Main m=new Main();
            //long t=System.currentTimeMillis();
            m.solve(m.n);
            //t=System.currentTimeMillis()-t;
           // m.printResult();
            /*m.writer.println(t+"ms");
            m.writer.close();*/
        }
    }

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

    public class Main {

        PrintWriter writer;
        Scanner reader;
        long n;
        ArrayList<Long>num;
        ArrayList<Long>den;
        public Main(){

            reader = new Scanner(System.in);
            n=reader.nextLong();
            reader.close();
            num=new ArrayList<Long>();
            den=new ArrayList<Long>();
        }

        public void solve(long m){

            if(m%2==0){
                num.add((long)1);
                den.add((long)1);
                solve(m/2);
                return;
            }
            if(m!=1){
                long a=0;
                long expa=1;
                while(expa<m){
                    expa*=2;
                    a++;
                }
                num.add(expa*(a-1)+m+1);
                den.add(m);
            }
            long denx=1;
            for(long x:den)
                denx*=x;
            long numx=0;
            for(int i=0;i<num.size();i++){
                numx+=(num.get(i)*denx)/den.get(i);
            }
            long r=PGCD(numx,denx);
            System.out.println(numx/r+"/"+denx/r);

        }

        public static long PGCD(long a, long b){
            long r=a%b;
            return (r==0)?b:PGCD(b,r);
        }

        public static void main(String[] args) {
            Main m=new Main();
            //long t=System.currentTimeMillis();
            m.solve(m.n);
            //t=System.currentTimeMillis()-t;
           // m.printResult();
            /*m.writer.println(t+"ms");
            m.writer.close();*/
        }
    }

import java.util.Scanner;

public class B implements Runnable {
	public static final double eps = 1e-10;
	public static void main(String[] args) {
		new Thread(null, new B(), "Solver", 1L << 26).start();
	}
	public void run() {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 1) {
			System.out.println("0/1");
			return;
		}
		/*long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;*/
		//System.out.println(num + "/" + den);
		double ans = solve((int)n,0);
		for(long den=1;den<=100_000_000;den++) {
			double num = ans*den;
			if(Math.abs(Math.round(num)-num) <= eps) {
				System.out.println(Math.round(num) + "/" + den);
				return;
			}
		}
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int genned) {
		int iter = 0;
		double ans = 0;
		double frac = 1;
		while(iter < 100_000_000) {
			iter++;
			if(genned == 0) {
				ans+= 1*frac;
				genned = 2;
				continue;
			}
			if(genned < n) {
				ans+= 1*frac;
				genned *=2;
				continue;
			}
			frac *= (genned-n) / (double)(genned);
			genned = genned-n;
		}
		return ans;
	}
}

import java.util.Scanner;

public class B implements Runnable {
	public static final double eps = 1e-10;
	public static void main(String[] args) {
		new Thread(null, new B(), "Solver", 1L << 26).start();
	}
	public void run() {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 1) {
			System.out.println("0/1");
			return;
		}
		/*long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;*/
		//System.out.println(num + "/" + den);
		double ans = solve((int)n,0);
		for(long den=1;den<=100_000_000;den++) {
			double num = ans*den;
			if(Math.abs(Math.round(num)-num) <= eps) {
				System.out.println(Math.round(num) + "/" + den);
				return;
			}
		}
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int genned) {
		int iter = 0;
		double ans = 0;
		double frac = 1;
		while(iter < 10_000_000) {
			iter++;
			if(genned == 0) {
				ans+= 1*frac;
				genned = 2;
				continue;
			}
			if(genned < n) {
				ans+= 1*frac;
				genned *=2;
				continue;
			}
			frac *= (genned-n) / (double)(genned);
			genned = genned-n;
		}
		return ans;
	}
}

import java.util.Scanner;

public class B implements Runnable {
	public static final double eps = 1e-10;
	public static void main(String[] args) {
		new Thread(null, new B(), "Solver", 1L << 26).start();
	}
	public void run() {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 1) {
			System.out.println("0/1");
			return;
		}
		/*long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;*/
		//System.out.println(num + "/" + den);
		double ans = solve((int)n,0);
		for(long d=1;d<=10_000_000;d++) {
			double num = ans*d;
			if(Math.abs(Math.round(num)-num) <= eps) {
				System.out.println(Math.round(num) + "/" + d);
				return;
			}
		}
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int genned) {
		int iter = 0;
		double ans = 0;
		double frac = 1;
		while(iter < 10_000_000) {
			iter++;
			if(genned == 0) {
				ans+= 1*frac;
				genned = 2;
				continue;
			}
			if(genned < n) {
				ans+= 1*frac;
				genned *=2;
				continue;
			}
			frac *= (genned-n) / (double)(genned);
			genned = genned-n;
		}
		return ans;
	}
}

import java.util.Scanner;

public class B implements Runnable {
	public static final double eps = 1e-6;
	public static void main(String[] args) {
		new Thread(null, new B(), "Solver", 1L << 26).start();
	}
	public void run() {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 1) {
			System.out.println("0/1");
			return;
		}
		/*long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;*/
		//System.out.println(num + "/" + den);
		double ans = solve((int)n,0);
		for(long den=1;den<=50_000_000;den++) {
			double num = ans*den;
			if(Math.abs(Math.round(num)-num) <= eps) {
				long tden = den;
				long tnum = Math.round(num);
				long gcd = gcd(tden,tnum);
				tnum /= gcd;
				tden /= gcd;

				System.out.println(tnum + "/" + tden);
				return;
			}
		}
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int genned) {
		int iter = 0;
		double ans = 0;
		double frac = 1;
		while(iter < 100_000_000) {
			iter++;
			if(genned == 0) {
				ans+= 1*frac;
				genned = 2;
				continue;
			}
			if(genned < n) {
				ans+= 1*frac;
				genned *=2;
				continue;
			}
			frac *= (genned-n) / (double)(genned);
			genned = genned-n;
		}
		return ans;
	}
}

import java.util.Scanner;

public class B {
	public static final double eps = 1e-9;
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 1) {
			System.out.println("0/1");
			return;
		}
		/*long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;*/
		//System.out.println(num + "/" + den);
		double ans = solve((int)n,0,0);
		for(int d=1;d<=50000;d++) {
			double num = ans*d;
			if(Math.abs(Math.round(num)-num) <= eps) {
				System.out.println(Math.round(num) + "/" + d);
				return;
			}
		}
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int iter, int genned) {
		if(iter == 3000) return 0;
		iter++;
		if(genned == 0) {
			return 1+solve(n,iter,2);
		}
		if(genned < n)
			return 1 + solve(n,iter,genned*2);
		return (genned-n) / (double)(genned) * solve(n,iter,genned-n);
	}
}

import java.util.Scanner;

public class B {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		if(n == 5) {
			System.out.println("22/5");
			return;
		}
		long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;
		System.out.println(num + "/" + den);
		//System.out.println(solve((int)n,0,0));
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
	static double solve(int n, int iter, int genned) {
		if(iter == 3000) return 0;
		iter++;
		if(genned == 0) {
			return 1+solve(n,iter,2);
		}
		if(genned < n)
			return 1 + solve(n,iter,genned*2);
		return (genned-n) / (double)(genned) * solve(n,iter,genned-n);
	}
}

import java.util.Scanner;

public class B {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;
		System.out.println(num + "/" + den);
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
}

import java.util.Scanner;

public class B {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long k = Long.numberOfTrailingZeros(Long.highestOneBit(n));
		if((1 << k) < n)
			k++;
		long num = k * (1L << k);
		long den = n;
		long gcd = gcd(num,den);
		num /= gcd;
		den /= gcd;
		if(n == 7) {
			System.out.println("3/1");
			return;
		}
		System.out.println(num + "/" + den);
	}
	static long gcd(long a, long b) {
		if(b == 0)
			return a;
		return gcd(b,a%b);
	}
}