#include<stdio.h>
#include<math.h>
int n;
long long p,q;
long long gcd(long long a,long long b){
long long temp;
while(b!=0){
a%=b;
temp=a;a=b;b=temp;
}
return a;
}
int main(){
long long gcd(long long a,long long b);
long long i,r,s;
freopen("pepsi.in","r",stdin);
freopen("pepsi.out","w",stdout);
scanf("%d",&n);
p=0;q=1;
for(i=1;i<=n;i++){
p=p*i+n*q;
q*=i;
}
r=p;s=q;
i=gcd(r,s);
p/=i; q/=i;
r=p/q; p%=q;
s=(long long)floor(log10(r));
n=(int)floor(log10(q));
for(i=0;i<=s;i++)printf(" "); printf("%lld\n",p);
printf("%lld",r); for(i=0;i<=n;i++) printf("-");
printf("\n");
for(i=0;i<=s;i++)printf(" "); printf("%lld",q);
return 0;
}