#include using namespace std; using ll=long long; using ld=long double; using P=pair; using V=vector; #define rep(i,n) for(int i=0;i> n >> s; reverse(s.begin(),s.end()); int ans=0,now=-10; rep(i,n) if(s[i]=='#'){ ans=max({ans,i+1,now+2}); now=max(i+1,now+2); } cout << ans << endl; }