#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))
//#pragma GCC optimize("O3")
using namespace std;
using namespace __gnu_pbds;
auto random_address = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_address() | 1);
mt19937_64 rng(SEED);
typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
ll a,b;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin>>a>>b;
    cout<<2*a+100-b;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {

  ios_base::sync_with_stdio(0);
  cin.tie(0);

  int h, w;
  cin >> h >> w;

  bool grid[h][w];

  for (int i = 0; i < h; i++)
    for (int j = 0; j < w; j++) {

      char c;
      cin >> c;

      grid[i][j] = c == '#';

    }

  int vertices = 0;

  for (int i = 0; i < h - 1; i++) {

    for (int j = 0; j < w - 1; j++) {

      int sum = grid[i][j] + 
                grid[i + 1][j] + 
                grid[i][j + 1] + 
                grid[i + 1][j + 1];

      vertices += sum == 1 || sum == 3;

    }

  }

  cout << vertices << endl;

  return 0;

}