#include <bits/stdc++.h>
using namespace std;

 int T, m, r, m1[200040], br=1, N;
 string s;

int main(){

  cin >> T;

  for(int i=1; i<=T; i++)
  {
     cin >> s;
     for(int j=s.size()-1; j>=0; j--)
     {
         N+=br*(int(s[j])-48);
         br*=10;
     }
     for(int k=2; k<=N; k++)
     {
         m=(k-1)*k;
         m1[k] = (k+1)*k;
         if(m1[k] != m1[k+1])
         {
             r++;
         }
     }
  }

  cout << r;

  return 0;
}