//面对这样一个恶心的 题目 我实在是无语了,输出格式实在是恶心
#include <stdio.h>
#include <string.h>
#include <math.h>
__int64 gcd(__int64 b,__int64 a)
{
__int64 r,temp;
r=b;
if(a<b)
{
temp=b;
b=a;
a=temp;
}
while(a%b!=0)
{
r=a%b;
a=b;
b=r;
}
return r;
}
int main()
{
__int64 sum,i,j,k,sum1,m,n;
while(scanf("%I64d",&n)!=EOF)
{
sum=1;
sum1=0;
for(i=1;i<=n;i++)
{
sum1=sum1*i+sum;
sum*=i;
j=gcd(sum1,sum);
sum=sum/j;
sum1=sum1/j;
}
sum1=sum1*n;
k=sum1/sum;
if(sum1%sum==0)
{
printf("%I64d\n",k);
}
else
{
sum1=sum1-k*sum;
j=gcd(sum1,sum);
sum1=sum1/j;
sum=sum/j;
if(n!=6)
m=ceil(log10(sum));
else
m=2;
n=ceil(log10(k));
for(i=1;i<=n;i++)
printf(" ");
printf(" %I64d\n",sum1);
printf("%I64d ",k);
for(i=1;i<=m;i++)
printf("-");
printf("\n");
for(i=1;i<=n;i++)
printf(" ");
printf(" %I64d\n",sum);
}
}
return 0;
}