#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,T B){return(A>B?A=B,1:0);} templateinline bool chmax(T&A,T B){return(A>V>>T; cout<<(stoi(V[0]+V.substr(2,4))*T/10000)<<"\n"; } main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout<>T; while(T--)sol(); }