class Harmonic
{
public static void main (String args[])
{
int k,n=3;
double i=1,s,f=0;
while(i<=n)
{
s=1/i;
f=f+s;
i++;
}
for(k=1;k<=n;k++)
{
System.out.print("1/i"+k);
System.out.print(" ");
System.out.print(" + ");
System.out.print(" ");
}
System.out.print("-----------");
System.out.print("="+f);
}
}