import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double f = scanner.nextDouble();
double c = 5.0 / 9 * (f - 32);
System.out.printf("%.3f", c);
}
}