#include<iostream>
#include<fstream>
#include<cmath>

using namespace::std;

int main()
{
	ifstream In("DATA1.txt",ios::in);
	ofstream Out("OUT1.txt",ios::out);

	int x=0;
	double vx,deg,power;
	double time,dt;
	double dx;
	const double PI = 3.141592654;
	double RadAngle;

	for(x=0;x<5;x++)
	{
		In>>deg;
		In>>power;
		RadAngle = (PI/180)*deg;
		time=(0-(sin(RadAngle)*power))/-9.81;
		vx=cos(RadAngle)*100;
		dt=time*2;
		dx=vx*dt;
		double Fra = dx-int(dx);
		if(Fra<0.5)
			Out<<int(dx)<<endl;
		else	
			Out<<int(dx)+1<<endl;
	}
	return(0);
}
