#include <iostream>
#include <fstream>

enum ErrorMessage { CONTESTANT_STDOUT = -1, BAD_TABLE = -2, BAD_STRING = -3 };

int main(int argc, char** argv){
	std::ifstream out(argv[3]);

	if(!out){
		std::cerr << "Outfile " << argv[3] << " not found." << std::endl;
		std::cout << 0 << std::endl;
		return 0;
	}

	int max_length;
	out >> max_length;
	
	if(max_length < 0){
		if(max_length == CONTESTANT_STDOUT){
			std::cerr << "Contestant wrote to standard output" << std::endl;
			std::cout << 0 << std::endl;
		}
		else if(max_length == BAD_TABLE){
			std::cerr << "Wrong answer [1]" << std::endl;
			std::cout << 0 << std::endl;
		}
		else if(max_length == BAD_STRING){
			std::cerr << "Wrong answer [2]" << std::endl;
			std::cout << 0 << std::endl;
		}
		else{
			std::cerr << "Unexplained error, notify the committee" << std::endl;
			std::cout << 0 << std::endl;
		}
		return 0;
	}
	int score = 0;
	if(max_length <= 28){
		score = 2 * max_length;
	}
	else if(max_length <= 39){
		score = (max_length + 28);
	}
	else if(max_length <= 50){
		score = (67 + 3 * (max_length - 40));
	}
	else{
		score = 100;
	}
	std::cerr << "Accepted: max_length = " << max_length << std::endl;
	std::cout << score / 100.0 << std::endl;
}
