#include using namespace std; using ch = char; using ll = long long; using ld = long double; using db = double; using st = string; using vdb = vector; using vvdb = vector; using vl = vector; using vvl = vector; using vvvl = vector; using vd = vector; using vvd = vector; using vs = vector; using vvs = vector; using vc = vector; using vvc = vector; using vb = vector; using vvb = vector; using vvvb = vector; const ll mod = 998244353; const ll MOD = 1000000007; using vp = vector>; #define fi first #define se second int main(){ ll N; cin>>N; st S; cin>>S; ll a; bool f=true; for(int i=N-1; i>-1; i--){ if(S.at(i)=='#'){ if(f){ a=N-i; f=false; } else{ a=max(N-i,a+2); } } } cout<