/*
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
//string x = Console.ReadLine();
//int x = Convert.ToInt32(Console.ReadLine()); // charactor 1
//int y = Convert.ToInt32(Console.ReadLine());
string a = Console.ReadLine();
int x = Convert.ToInt32(a);
// 10: 1 > 49, 0 : 48
for (int i = 1; i <= 9; i++)
{
for (int j = x; j <= y; j++)
{
Console.Write(j + " x " + i + " = " + (i * j) + "\t");
}
Console.WriteLine();
}
Console.ReadKey();
}
}
}*/
using System;
namespace Helloworld
{
class Program
{
static void Main(string[] args)
{
string p = Console.ReadLine();
string[] pv = p.Split(' ');
int x = Convert.ToInt32(pv[0]);
int k = Convert.ToInt32(pv[1]);
int s = 0;
/* x = 5
*
* *****
* ** **
* * * *
* ** **
* *****
*
*/
/*
for (int i = 0; i < x; i++)
{
for (int j = 0; j < x; j++)
{
Console.Write("(" + i + "," + j + ")" + "\t");
}
Console.WriteLine();
}*/
for(int i=0; i<x; i++)
{
for(int j=0; j<x; j++)
{
if(i==0 || j==0 || i==x-1 || j==x-1 || (i+j+1)%k==0)
{
Console.Write("*");
}
else
{
Console.Write(" ");
}
}
Console.WriteLine();
}
/*
for(int i=1; i<=x; i++)
{
if(x%i==0)
{
s++;
}
}
if(s==2)
{
}
else
{
}*/
}
}
}
*
***
*****




using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
string f = Console.ReadLine();
//int x = Convert.ToInt32(Console.ReadLine());
double x = Convert.ToDouble(f);
double temperature = (double)(x* 9 / 5) + 32;
Console.WriteLine(temperature);
}
}
}