using System;
public class Program
{
public static void Main()
Console.WriteLine("Въведи път до файла");
string s1 = Console.ReadLine();
int x1, x2, x3;
x1 = s1.LastIndexOf("/") + 1;
x2 = s1.LastIndexOf(".");
x3 = x2-x1;
string s2 = s1.Substring(x1 , x3);
Console.WriteLine(s2 + ".jpg");
}