#include <iostream>
using namespace std;

int main() {
	int n;
	double k = 1;
	while ( cin >> n ) {
		for ( int i = 366 - n; i <= 365; i++ ) {
			k = k * i;
			k = k / 365;
		}
		cout << fixed;
		cout.precision(8);
		cout << 100 * ( 1 - k ) << "%" << endl;
		k=1;
	}
	return 0;
}