#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int calc(int m)
{
int res = 0;
int money[] = {100, 50, 10, 5, 2, 1};
for(int x:money)
{
res += m/x;
m %= x;
}
return res;
}
int main()
{
int n;
while(cin >> n)
{
int res = 0;
for(int i = 0; i < n; i++)
{
int m;
scanf("%d", &m);
res += calc(m);
}
printf("%d\n", res);
}
return 0;
}